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

Side by Side Diff: ios/web/browser_state_web_view_partition_inttest.mm

Issue 2655493002: Disable BrowserStateWebViewPartitionTest.Cookies (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <WebKit/WebKit.h> 5 #import <WebKit/WebKit.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 private: 127 private:
128 // The ResponseProvider used to load a simple web page. 128 // The ResponseProvider used to load a simple web page.
129 web::ResponseProvider* provider_; 129 web::ResponseProvider* provider_;
130 // The OTR browser state used in tests. 130 // The OTR browser state used in tests.
131 web::TestBrowserState otr_browser_state_; 131 web::TestBrowserState otr_browser_state_;
132 }; 132 };
133 133
134 // Tests that cookies are partitioned between web views created with a 134 // Tests that cookies are partitioned between web views created with a
135 // non-OTR BrowserState and an OTR BrowserState. 135 // non-OTR BrowserState and an OTR BrowserState.
136 TEST_F(BrowserStateWebViewPartitionTest, Cookies) { 136 // Flaky: crbug/684024
137 TEST_F(BrowserStateWebViewPartitionTest, DISABLED_Cookies) {
137 WKWebView* web_view_1 = web::BuildWKWebView(CGRectZero, GetBrowserState()); 138 WKWebView* web_view_1 = web::BuildWKWebView(CGRectZero, GetBrowserState());
138 LoadTestWebPage(web_view_1); 139 LoadTestWebPage(web_view_1);
139 SetCookie(@"someCookieName1", @"someCookieValue1", web_view_1); 140 SetCookie(@"someCookieName1", @"someCookieValue1", web_view_1);
140 EXPECT_NSEQ(@"someCookieName1=someCookieValue1", GetCookies(web_view_1)); 141 EXPECT_NSEQ(@"someCookieName1=someCookieValue1", GetCookies(web_view_1));
141 142
142 WKWebView* web_view_2 = web::BuildWKWebView(CGRectZero, GetOtrBrowserState()); 143 WKWebView* web_view_2 = web::BuildWKWebView(CGRectZero, GetOtrBrowserState());
143 LoadTestWebPage(web_view_2); 144 LoadTestWebPage(web_view_2);
144 145
145 // Test that the cookie has not leaked over to |web_view_2|. 146 // Test that the cookie has not leaked over to |web_view_2|.
146 EXPECT_NSEQ(@"", GetCookies(web_view_2)); 147 EXPECT_NSEQ(@"", GetCookies(web_view_2));
(...skipping 23 matching lines...) Expand all
170 SetLocalStorageItem(@"someKey2", @"someValue2", web_view_2); 171 SetLocalStorageItem(@"someKey2", @"someValue2", web_view_2);
171 // Due to platform limitation, it's not possible to actually set localStorage 172 // Due to platform limitation, it's not possible to actually set localStorage
172 // item on an OTR BrowserState. Therefore, it's not possible to verify that a 173 // item on an OTR BrowserState. Therefore, it's not possible to verify that a
173 // localStorage item has been correctly set. 174 // localStorage item has been correctly set.
174 // Look at 175 // Look at
175 // http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-s afari-quota-exceeded-err-dom-exception-22-an 176 // http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-s afari-quota-exceeded-err-dom-exception-22-an
176 // for more details. 177 // for more details.
177 // Test that LocalStorage has not leaked over to |web_view_1|. 178 // Test that LocalStorage has not leaked over to |web_view_1|.
178 EXPECT_NSEQ([NSNull null], GetLocalStorageItem(@"someKey2", web_view_1)); 179 EXPECT_NSEQ([NSNull null], GetLocalStorageItem(@"someKey2", web_view_1));
179 } 180 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698