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

Side by Side Diff: third_party/WebKit/Source/web/tests/MHTMLTest.cpp

Issue 2837053004: Allows MHTM page to open a popup (Closed)
Patch Set: Update test Created 3 years, 7 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 | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 // Register the mocked frame and load it. 270 // Register the mocked frame and load it.
271 RegisterMockedURLLoad(kURL, "simple_test.mht"); 271 RegisterMockedURLLoad(kURL, "simple_test.mht");
272 LoadURLInTopFrame(ToKURL(kURL)); 272 LoadURLInTopFrame(ToKURL(kURL));
273 ASSERT_TRUE(GetPage()); 273 ASSERT_TRUE(GetPage());
274 LocalFrame* frame = ToLocalFrame(GetPage()->MainFrame()); 274 LocalFrame* frame = ToLocalFrame(GetPage()->MainFrame());
275 ASSERT_TRUE(frame); 275 ASSERT_TRUE(frame);
276 Document* document = frame->GetDocument(); 276 Document* document = frame->GetDocument();
277 ASSERT_TRUE(document); 277 ASSERT_TRUE(document);
278 278
279 // Full sandboxing should be turned on. 279 // Full sandboxing with the exception to new top-level windows should be
280 EXPECT_TRUE(document->IsSandboxed(kSandboxAll)); 280 // turned on.
281 EXPECT_EQ(kSandboxAll & ~(kSandboxPopups |
282 kSandboxPropagatesToAuxiliaryBrowsingContexts),
283 document->GetSandboxFlags());
281 284
282 // MHTML document should be loaded into unique origin. 285 // MHTML document should be loaded into unique origin.
283 EXPECT_TRUE(document->GetSecurityOrigin()->IsUnique()); 286 EXPECT_TRUE(document->GetSecurityOrigin()->IsUnique());
284 // Script execution should be disabled. 287 // Script execution should be disabled.
285 EXPECT_FALSE(document->CanExecuteScripts(kNotAboutToExecuteScript)); 288 EXPECT_FALSE(document->CanExecuteScripts(kNotAboutToExecuteScript));
286 } 289 }
287 290
288 } // namespace blink 291 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698