Chromium Code Reviews| Index: ios/chrome/browser/web/window_open_by_dom_egtest.mm |
| diff --git a/ios/chrome/browser/web/window_open_by_dom_egtest.mm b/ios/chrome/browser/web/window_open_by_dom_egtest.mm |
| index 6df1cbd2ef48826cc16d1bb0d9e0e9e3290aa31a..b1ceb2169c65f0c343761607fb48f6201ad90776 100644 |
| --- a/ios/chrome/browser/web/window_open_by_dom_egtest.mm |
| +++ b/ios/chrome/browser/web/window_open_by_dom_egtest.mm |
| @@ -60,6 +60,26 @@ const char kTestURL[] = |
| AssertMainTabCount(1); |
| } |
| +// Tests that |sessionStorage| content is available for windows open by DOM via |
|
baxley
2017/02/03 15:23:38
nit: I don't quite understand "windows open by DOM
Eugene But (OOO till 7-30)
2017/02/03 19:04:23
Yes, it should be "windows opened by DOM". Done.
|
| +// |target="_blank"| links. |
| +// TODO(crbug.com/681434): Enable this test. |
| +- (void)DISABLED_testLinkWithBlankTargetSessionStorage { |
| + using chrome_test_util::ExecuteJavaScript; |
| + |
| + NSError* error = nil; |
| + ExecuteJavaScript(@"sessionStorage.setItem('key', 'value');", &error); |
| + GREYAssert(!error, @"Error during script execution: %@", error); |
| + |
| + TapWebViewElementWithId("webScenarioWindowOpenSamePageWithBlankTarget"); |
| + AssertMainTabCount(2); |
| + [[EarlGrey selectElementWithMatcher:WebViewContainingText("Expected result")] |
| + assertWithMatcher:grey_notNil()]; |
| + |
| + id value = ExecuteJavaScript(@"sessionStorage.getItem('key');", &error); |
| + GREYAssert(!error, @"Error during script execution: %@", error); |
| + GREYAssert([value isEqual:@"value"], @"sessionStorage is not shared"); |
| +} |
| + |
| // Tests a link with target="_blank". |
| - (void)testLinkWithBlankTarget { |
| TapWebViewElementWithId("webScenarioWindowOpenRegularLink"); |