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

Side by Side Diff: chrome/browser/extensions/process_manager_browsertest.cc

Issue 2314363002: extensions: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Comment addressed Created 4 years, 3 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/extensions/pack_extension_unittest.cc ('k') | chrome/browser/extensions/service_worker_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698