Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: ios/chrome/browser/web/window_open_by_dom_egtest.mm

Issue 2672893003: EG test for sessionStorage sharing. (Closed)
Patch Set: Self review Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/testing/data/http_server_files/window_open.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « no previous file | ios/testing/data/http_server_files/window_open.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698