OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 dir->WriteFile(FILE_PATH_LITERAL("two_iframes.html"), | 127 dir->WriteFile(FILE_PATH_LITERAL("two_iframes.html"), |
128 "<iframe id='frame1' src='empty.html'></iframe>" | 128 "<iframe id='frame1' src='empty.html'></iframe>" |
129 "<iframe id='frame2' src='empty.html'></iframe>"); | 129 "<iframe id='frame2' src='empty.html'></iframe>"); |
130 | 130 |
131 dir->WriteFile(FILE_PATH_LITERAL("sandboxed.html"), "Some sandboxed page"); | 131 dir->WriteFile(FILE_PATH_LITERAL("sandboxed.html"), "Some sandboxed page"); |
132 | 132 |
133 dir->WriteFile(FILE_PATH_LITERAL("empty.html"), ""); | 133 dir->WriteFile(FILE_PATH_LITERAL("empty.html"), ""); |
134 | 134 |
135 dir->WriteManifest(manifest.ToJSON()); | 135 dir->WriteManifest(manifest.ToJSON()); |
136 | 136 |
137 const Extension* extension = LoadExtension(dir->unpacked_path()); | 137 const Extension* extension = LoadExtension(dir->UnpackedPath()); |
138 EXPECT_TRUE(extension); | 138 EXPECT_TRUE(extension); |
139 temp_dirs_.push_back(std::move(dir)); | 139 temp_dirs_.push_back(std::move(dir)); |
140 return extension; | 140 return extension; |
141 } | 141 } |
142 | 142 |
143 // ui_test_utils::NavigateToURL sometimes returns too early: It returns as | 143 // ui_test_utils::NavigateToURL sometimes returns too early: It returns as |
144 // soon as the StopLoading notification has been triggered. This does not | 144 // soon as the StopLoading notification has been triggered. This does not |
145 // imply that RenderFrameDeleted was called, so the test may continue too | 145 // imply that RenderFrameDeleted was called, so the test may continue too |
146 // early and fail when ProcessManager::GetAllFrames() returns too many frames | 146 // early and fail when ProcessManager::GetAllFrames() returns too many frames |
147 // (namely frames that are in the process of being deleted). To work around | 147 // (namely frames that are in the process of being deleted). To work around |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 extension->id(), | 569 extension->id(), |
570 "document.cookie = 'extension_cookie';" | 570 "document.cookie = 'extension_cookie';" |
571 "window.domAutomationController.send(document.cookie);"); | 571 "window.domAutomationController.send(document.cookie);"); |
572 std::string message; | 572 std::string message; |
573 ASSERT_TRUE(queue.WaitForMessage(&message)); | 573 ASSERT_TRUE(queue.WaitForMessage(&message)); |
574 EXPECT_EQ(message, "\"extension_cookie\""); | 574 EXPECT_EQ(message, "\"extension_cookie\""); |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 } // namespace extensions | 578 } // namespace extensions |
OLD | NEW |