Skip to content

Commit 2015c10

Browse files
committed
Open gates for www
These used to not be covered because they used Cache which wasn't exposed.
1 parent 8e48c55 commit 2015c10

17 files changed

+53
-58
lines changed

packages/react-dom/src/__tests__/ReactDOMFiberAsync-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ describe('ReactDOMFiberAsync', () => {
286286
expect(ops).toEqual(['BC', 'ABCD']);
287287
});
288288

289-
// @gate experimental
289+
// @gate experimental || www
290290
it('flushControlled flushes updates before yielding to browser', () => {
291291
let inst;
292292
class Counter extends React.Component {
@@ -326,7 +326,7 @@ describe('ReactDOMFiberAsync', () => {
326326
]);
327327
});
328328

329-
// @gate experimental
329+
// @gate experimental || www
330330
it('flushControlled does not flush until end of outermost batchedUpdates', () => {
331331
let inst;
332332
class Counter extends React.Component {
@@ -357,7 +357,7 @@ describe('ReactDOMFiberAsync', () => {
357357
]);
358358
});
359359

360-
// @gate experimental
360+
// @gate experimental || www
361361
it('flushControlled returns nothing', () => {
362362
// In the future, we may want to return a thenable "work" object.
363363
let inst;

packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ describe('ReactDOMServerPartialHydration', () => {
571571
expect(span.className).toBe('hi');
572572
});
573573

574-
// @gate experimental
574+
// @gate experimental || www
575575
it('blocks updates to hydrate the content first if props changed at idle priority', async () => {
576576
let suspend = false;
577577
let resolve;
@@ -1498,7 +1498,7 @@ describe('ReactDOMServerPartialHydration', () => {
14981498
expect(container.textContent).toBe('ALoading B');
14991499
});
15001500

1501-
// @gate experimental
1501+
// @gate experimental || www
15021502
it('clears server boundaries when SuspenseList runs out of time hydrating', async () => {
15031503
let suspend = false;
15041504
let resolve;
@@ -2617,7 +2617,7 @@ describe('ReactDOMServerPartialHydration', () => {
26172617
expect(span.innerHTML).toBe('Hidden child');
26182618
});
26192619

2620-
// @gate experimental
2620+
// @gate experimental || www
26212621
it('renders a hidden LegacyHidden component inside a Suspense boundary', async () => {
26222622
const ref = React.createRef();
26232623

@@ -2646,7 +2646,7 @@ describe('ReactDOMServerPartialHydration', () => {
26462646
expect(span.innerHTML).toBe('Hidden child');
26472647
});
26482648

2649-
// @gate experimental
2649+
// @gate experimental || www
26502650
it('renders a visible LegacyHidden component', async () => {
26512651
const ref = React.createRef();
26522652

packages/react-dom/src/__tests__/ReactDOMServerSelectiveHydration-test.internal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ describe('ReactDOMServerSelectiveHydration', () => {
812812
document.body.removeChild(container);
813813
});
814814

815-
// @gate experimental
815+
// @gate experimental || www
816816
it('hydrates the last explicitly hydrated target at higher priority', async () => {
817817
function Child({text}) {
818818
Scheduler.unstable_yieldValue(text);
@@ -861,7 +861,7 @@ describe('ReactDOMServerSelectiveHydration', () => {
861861
expect(Scheduler).toFlushAndYield(['App', 'C', 'B', 'A']);
862862
});
863863

864-
// @gate experimental
864+
// @gate experimental || www
865865
it('hydrates before an update even if hydration moves away from it', async () => {
866866
function Child({text}) {
867867
Scheduler.unstable_yieldValue(text);

packages/react-dom/src/__tests__/ReactUpdates-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ describe('ReactUpdates', () => {
13001300
expect(ops).toEqual(['Foo', 'Bar', 'Baz']);
13011301
});
13021302

1303-
// @gate experimental
1303+
// @gate experimental || www
13041304
it('delays sync updates inside hidden subtrees in Concurrent Mode', () => {
13051305
const container = document.createElement('div');
13061306

packages/react-dom/src/__tests__/ReactWrongReturnPointer-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ test('warns in DEV if return pointer is inconsistent', async () => {
194194
);
195195
});
196196

197-
// @gate experimental
198197
// @gate enableCache
199198
test('regression (#20932): return pointer is correct before entering deleted tree', async () => {
200199
// Based on a production bug. Designed to trigger a very specific

packages/react-fetch/src/__tests__/ReactFetchNode-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('ReactFetchNode', () => {
3939
server = null;
4040
});
4141

42-
// @gate experimental
42+
// @gate experimental || www
4343
it('can fetch text from a server component', async () => {
4444
serverImpl = (req, res) => {
4545
res.write('mango');
@@ -51,7 +51,7 @@ describe('ReactFetchNode', () => {
5151
expect(text).toEqual('mango');
5252
});
5353

54-
// @gate experimental
54+
// @gate experimental || www
5555
it('can fetch json from a server component', async () => {
5656
serverImpl = (req, res) => {
5757
res.write(JSON.stringify({name: 'Sema'}));
@@ -63,7 +63,7 @@ describe('ReactFetchNode', () => {
6363
expect(json).toEqual({name: 'Sema'});
6464
});
6565

66-
// @gate experimental
66+
// @gate experimental || www
6767
it('provides response status', async () => {
6868
serverImpl = (req, res) => {
6969
res.write(JSON.stringify({name: 'Sema'}));
@@ -79,7 +79,7 @@ describe('ReactFetchNode', () => {
7979
});
8080
});
8181

82-
// @gate experimental
82+
// @gate experimental || www
8383
it('handles different paths', async () => {
8484
serverImpl = (req, res) => {
8585
switch (req.url) {
@@ -105,7 +105,7 @@ describe('ReactFetchNode', () => {
105105
expect(outputs).toMatchObject(['banana', 'mango', 'orange']);
106106
});
107107

108-
// @gate experimental
108+
// @gate experimental || www
109109
it('can produce an error', async () => {
110110
serverImpl = (req, res) => {};
111111

packages/react-interactions/events/src/dom/create-event-handle/__tests__/useFocus-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function initializeModules(hasPointerEvents) {
2828

2929
// TODO: This import throws outside of experimental mode. Figure out better
3030
// strategy for gated imports.
31-
if (__EXPERIMENTAL__) {
31+
if (__EXPERIMENTAL__ || global.__WWW__) {
3232
useFocus = require('react-interactions/events/focus').useFocus;
3333
}
3434
}

packages/react-reconciler/src/__tests__/DebugTracing-test.internal.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('DebugTracing', () => {
4343
});
4444
});
4545

46-
// @gate experimental
46+
// @gate experimental || www
4747
it('should not log anything for sync render without suspends or state updates', () => {
4848
ReactTestRenderer.create(
4949
<React.unstable_DebugTracingMode>
@@ -54,7 +54,7 @@ describe('DebugTracing', () => {
5454
expect(logs).toEqual([]);
5555
});
5656

57-
// @gate experimental
57+
// @gate experimental || www
5858
it('should not log anything for concurrent render without suspends or state updates', () => {
5959
ReactTestRenderer.create(
6060
<React.unstable_DebugTracingMode>
@@ -396,7 +396,7 @@ describe('DebugTracing', () => {
396396
]);
397397
});
398398

399-
// @gate experimental
399+
// @gate experimental || www
400400
it('should not log anything outside of a unstable_DebugTracingMode subtree', () => {
401401
function ExampleThatCascades() {
402402
const [didMount, setDidMount] = React.useState(false);

packages/react-reconciler/src/__tests__/ReactCache-test.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe('ReactCache', () => {
149149
}
150150
}
151151

152-
// @gate experimental
152+
// @gate experimental || www
153153
test('render Cache component', async () => {
154154
const root = ReactNoop.createRoot();
155155
await ReactNoop.act(async () => {
@@ -158,7 +158,7 @@ describe('ReactCache', () => {
158158
expect(root).toMatchRenderedOutput('Hi');
159159
});
160160

161-
// @gate experimental
161+
// @gate experimental || www
162162
test('mount new data', async () => {
163163
const root = ReactNoop.createRoot();
164164
await ReactNoop.act(async () => {
@@ -180,7 +180,7 @@ describe('ReactCache', () => {
180180
expect(root).toMatchRenderedOutput('A');
181181
});
182182

183-
// @gate experimental
183+
// @gate experimental || www
184184
test('root acts as implicit cache boundary', async () => {
185185
const root = ReactNoop.createRoot();
186186
await ReactNoop.act(async () => {
@@ -200,7 +200,7 @@ describe('ReactCache', () => {
200200
expect(root).toMatchRenderedOutput('A');
201201
});
202202

203-
// @gate experimental
203+
// @gate experimental || www
204204
test('multiple new Cache boundaries in the same update share the same, fresh cache', async () => {
205205
function App({text}) {
206206
return (
@@ -239,7 +239,7 @@ describe('ReactCache', () => {
239239
expect(root).toMatchRenderedOutput('AA');
240240
});
241241

242-
// @gate experimental
242+
// @gate experimental || www
243243
test(
244244
'nested cache boundaries share the same cache as the root during ' +
245245
'the initial render',
@@ -272,7 +272,7 @@ describe('ReactCache', () => {
272272
},
273273
);
274274

275-
// @gate experimental
275+
// @gate experimental || www
276276
test('new content inside an existing Cache boundary should re-use already cached data', async () => {
277277
function App({showMore}) {
278278
return (
@@ -309,7 +309,7 @@ describe('ReactCache', () => {
309309
expect(root).toMatchRenderedOutput('A [v1]A [v1]');
310310
});
311311

312-
// @gate experimental
312+
// @gate experimental || www
313313
test('a new Cache boundary uses fresh cache', async () => {
314314
// The only difference from the previous test is that the "Show More"
315315
// content is wrapped in a nested <Cache /> boundary
@@ -356,7 +356,7 @@ describe('ReactCache', () => {
356356
expect(root).toMatchRenderedOutput('A [v1]A [v2]');
357357
});
358358

359-
// @gate experimental
359+
// @gate experimental || www
360360
test('inner content uses same cache as shell if spawned by the same transition', async () => {
361361
const root = ReactNoop.createRoot();
362362

@@ -431,7 +431,7 @@ describe('ReactCache', () => {
431431
);
432432
});
433433

434-
// @gate experimental
434+
// @gate experimental || www
435435
test('refresh a cache', async () => {
436436
let refresh;
437437
function App() {
@@ -474,7 +474,7 @@ describe('ReactCache', () => {
474474
expect(root).toMatchRenderedOutput('A [v2]');
475475
});
476476

477-
// @gate experimental
477+
// @gate experimental || www
478478
test('refresh the root cache', async () => {
479479
let refresh;
480480
function App() {
@@ -515,7 +515,7 @@ describe('ReactCache', () => {
515515
expect(root).toMatchRenderedOutput('A [v2]');
516516
});
517517

518-
// @gate experimental
518+
// @gate experimental || www
519519
test('refresh a cache with seed data', async () => {
520520
let refresh;
521521
function App() {
@@ -558,7 +558,7 @@ describe('ReactCache', () => {
558558
expect(root).toMatchRenderedOutput('A [v2]');
559559
});
560560

561-
// @gate experimental
561+
// @gate experimental || www
562562
test('refreshing a parent cache also refreshes its children', async () => {
563563
let refreshShell;
564564
function RefreshShell() {
@@ -623,7 +623,7 @@ describe('ReactCache', () => {
623623
expect(root).toMatchRenderedOutput('A [v3]A [v3]');
624624
});
625625

626-
// @gate experimental
626+
// @gate experimental || www
627627
test(
628628
'refreshing a cache boundary does not refresh the other boundaries ' +
629629
'that mounted at the same time (i.e. the ones that share the same cache)',
@@ -696,7 +696,7 @@ describe('ReactCache', () => {
696696
},
697697
);
698698

699-
// @gate experimental
699+
// @gate experimental || www
700700
test(
701701
'mount a new Cache boundary in a sibling while simultaneously ' +
702702
'resolving a Suspense boundary',
@@ -758,7 +758,7 @@ describe('ReactCache', () => {
758758
},
759759
);
760760

761-
// @gate experimental
761+
// @gate experimental || www
762762
test('cache pool is cleared once transitions that depend on it commit their shell', async () => {
763763
function Child({text}) {
764764
return (
@@ -841,7 +841,7 @@ describe('ReactCache', () => {
841841
expect(root).toMatchRenderedOutput('A [v1]A [v1]A [v2]');
842842
});
843843

844-
// @gate experimental
844+
// @gate experimental || www
845845
test('cache pool is not cleared by arbitrary commits', async () => {
846846
function App() {
847847
return (

packages/react-reconciler/src/__tests__/ReactContextPropagation-test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ describe('ReactLazyContextPropagation', () => {
542542
expect(root).toMatchRenderedOutput('BB');
543543
});
544544

545-
// @gate experimental
545+
// @gate experimental || www
546546
test('context is propagated through offscreen trees', async () => {
547547
const LegacyHidden = React.unstable_LegacyHidden;
548548

@@ -588,7 +588,7 @@ describe('ReactLazyContextPropagation', () => {
588588
expect(root).toMatchRenderedOutput('BB');
589589
});
590590

591-
// @gate experimental
591+
// @gate experimental || www
592592
test('multiple contexts are propagated across through offscreen trees', async () => {
593593
// Same as previous test, but with multiple context providers
594594
const LegacyHidden = React.unstable_LegacyHidden;
@@ -744,7 +744,6 @@ describe('ReactLazyContextPropagation', () => {
744744
expect(root).toMatchRenderedOutput('BB');
745745
});
746746

747-
// @gate experimental
748747
// @gate enableCache
749748
test('nested bailouts across retries', async () => {
750749
// Lazy context propagation will stop propagating when it hits the first
@@ -814,7 +813,7 @@ describe('ReactLazyContextPropagation', () => {
814813
expect(root).toMatchRenderedOutput('BB');
815814
});
816815

817-
// @gate experimental
816+
// @gate experimental || www
818817
test('nested bailouts through offscreen trees', async () => {
819818
// Lazy context propagation will stop propagating when it hits the first
820819
// match. If we bail out again inside that tree, we must resume propagating.

packages/react-reconciler/src/__tests__/ReactIncremental-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ describe('ReactIncremental', () => {
270270
expect(inst.state).toEqual({text: 'bar', text2: 'baz'});
271271
});
272272

273-
// @gate experimental
273+
// @gate experimental || www
274274
it('can deprioritize unfinished work and resume it later', () => {
275275
function Bar(props) {
276276
Scheduler.unstable_yieldValue('Bar');
@@ -316,7 +316,7 @@ describe('ReactIncremental', () => {
316316
expect(Scheduler).toFlushAndYield(['Middle', 'Middle']);
317317
});
318318

319-
// @gate experimental
319+
// @gate experimental || www
320320
it('can deprioritize a tree from without dropping work', () => {
321321
function Bar(props) {
322322
Scheduler.unstable_yieldValue('Bar');
@@ -1999,7 +1999,7 @@ describe('ReactIncremental', () => {
19991999
});
20002000
}
20012001

2002-
// @gate experimental
2002+
// @gate experimental || www
20032003
it('provides context when reusing work', () => {
20042004
class Intl extends React.Component {
20052005
static childContextTypes = {

packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ describe('ReactIncrementalErrorHandling', () => {
308308
expect(ReactNoop.getChildren()).toEqual([span('Everything is fine.')]);
309309
});
310310

311-
// @gate experimental
311+
// @gate experimental || www
312312
it('does not include offscreen work when retrying after an error', () => {
313313
function App(props) {
314314
if (props.isBroken) {

0 commit comments

Comments
 (0)