This has been a week of surprises from Chief Justice John Roberts. Wednesday he joined the Court’s more liberal members in a 5-4 decision in a significant First Amendment case. Tuesday at the argument in Obergefell v. Hodges, the marriage equality cases, he suggested that a ban on same-sex marriage might present a “straightforward question of sexual discrimination.” These superficially surprising moves support Roberts’s oft-repeated claim that he believes the Justices should decide cases based on the law, not politics. But as Roberts’s tenth term as Chief Justice comes to a close, the biggest tests of that claim are still to come in the Court’s decisions in Obergefell and in King, the latest challenge to the Affordable Care Act (ACA). While no one can know for sure what Roberts will do in those cases, there’s a good chance that he’ll remain unpredictable into June.

In Wednesday’s decision in Williams-Yulee v. Florida Bar, Roberts surprised Court watchers when he joined the Court’s more liberal members to hold that the First Amendment permits Florida to ban judicial candidates from personally soliciting campaign funds. Roberts wrote for the Court that “[a] State may assure its people that judges will apply the law without fear or favor—and without having personally asked anyone for money.” This was a big deal, and a relative bombshell by the Chief Justice. In the first decade of the Roberts Court, almost every term has had a significant decision sharply limiting campaign finance legislation, and Roberts has been in the majority in all of them. Last year, in McCutcheon v. FEC, he wrote the opinion striking down federal limits on aggregate campaign contributions, stating that the $123,000 limit per two-year election cycle “seriously restrict[s] participation in the democratic process” and thus conflicted with the “First Amendment right of citizens to choose who shall govern them.”

And last week, in Rodriguez v. United States, Roberts joined with the Court’s more liberal members and Justice Antonin Scalia in an important Fourth Amendment case, holding that the police may not extend a traffic stop to conduct a dog sniff absent independent reasonable suspicion. This isn’t the first time Roberts has cast a vote for more robust Fourth Amendment protections—last term, he wrote a significant opinion that generally prohibits warrantless cell phone searches following arrest—but there was little reason to expect his vote here. By my count, Roberts has cast his vote for the government in just under 85 percent of the Fourth Amendment cases the Court’s decided during his tenure.

Earlier this term, Roberts offered another surprising opinion when he, alone among the conservatives on the Court, joined an opinion with the Court’s more liberal justices that provided employment protections to pregnant workers. In that case, the Court held that employers will generally need to provide accommodation to pregnant workers unless the employers can show a “legitimate, nondiscriminatory” reason for doing so, and that the simple fact that such accommodations might be expensive or inconvenient is not a sufficient explanation. (Justice Samuel Alito agreed with the majority’s outcome, but not their reasoning.) This, too, was a big deal and a major surprise from John Roberts, whose record on women’s rights has not been good. Indeed, in cases such as Ledbetter v. Goodyear Tire & Rubber Co., which held that a female plaintiff could not bring her claim of pay discrimination, and Burwell v. Hobby Lobby, which limited the reach of the Affordable Care Act’s contraception mandate, Roberts had often cast a critical fifth vote to limit reproductive freedom and to support employers over their female employees.

To be sure, Roberts remains an exceptionally conservative Justice, casting votes in favor of conservative outcomes far more often than not. But increasingly in recent years, he has voted with the Court’s more liberal members or has differentiated himself from the Court’s other conservatives. The most famous example is his vote to uphold the individual mandate of the ACA in 2012, but there are many others. Consider, for example, cases involving the environment. In Roberts’s first eight years as Chief Justice, in major environmental law cases that divided the Court, Roberts cast vote after vote against environmental protection, weakening critical environmental laws passed by Congress. But last year, the Court heard two important environmental law cases, and Roberts voted to uphold significant environmental protections in both. It’s impossible to say what accounts for this trend, or whether it will continue. Perhaps as his tenth anniversary as Chief Justice approaches, Roberts has become more sensitive to his legacy and wants to honor, at least at times, his oft-repeated claim that the Justices decide cases based on the law, not their policy or political preferences.

The biggest tests of that claim are still to come. Tuesday's marriage case and King v. Burwell, the latest ACA challenge which the Court heard earlier this year, are not only the two biggest cases of this term, they’re also two of the biggest cases of Roberts’s tenure as Chief Justice. How the Roberts Court decides these cases, and how John Roberts decides them, will help define the legacy of the Roberts Court and Roberts’s legacy as its Chief Justice.

The issue in King is whether individuals who purchase their health insurance through a federally facilitated Exchange under the ACA will continue to get the tax credits that help them purchase that insurance. The text, history, and purpose of the statute all make clear that they should, and the IRS has confirmed that interpretation of the law by regulation. When the Court heard King in March, Roberts didn’t say much, but he did ask a question about Chevron v. NRDC, a 1984 Supreme Court case that holds that courts should defer to reasonable agency interpretations of ambiguous laws. The question suggested that Roberts might be considering saying that the ACA is ambiguous, but that the IRS’s interpretation is reasonable and therefore the Court should defer to it. This wouldn’t be exactly what ACA proponents are hoping the Court will do (they’re arguing that the law unambiguously requires tax credits on federally-facilitated Exchanges), but it would still be a win, ensuring that qualifying Americans continue to get their tax credits and federally facilitated Exchanges continue to operate properly.

The big issue in the marriage cases is whether there’s a constitutional right to marriage equality for LGBT Americans. Going into the argument, I (and others) argued that Roberts’s vote was in play, and that marriage equality proponents shouldn’t count him out. At Tuesday's argument, he made it clear that he’s unlikely to recognize that the Constitution entitles LGBT Americans to enjoy the fundamental right to marry. But his question about sexual discrimination—“I mean, if Sue loves Joe and Tom loves Joe, Sue can marry him and Tom can't. And the difference is based upon their different sex. Why isn't that a straightforward question of sexual discrimination?”—suggests, as one law professor predicted, that he may vote to strike down same-sex marriage bans on sex discrimination grounds. This would be a pretty significant shift, after his vote two years ago to uphold the provision of federal law that defined marriage to be between a man and a woman.

Some justices' decisions are often easy to predict. Roberts used to be one of those, but that’s becoming less so. In many important cases, progressives shouldn’t count him out.