OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/bookmarks/bookmark_model.h" | 8 #include "chrome/browser/bookmarks/bookmark_model.h" |
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
10 #include "chrome/browser/bookmarks/bookmark_utils.h" | 10 #include "chrome/browser/bookmarks/bookmark_utils.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 22 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
23 #include "chrome/common/chrome_notification_types.h" | 23 #include "chrome/common/chrome_notification_types.h" |
24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
25 #include "chrome/common/extensions/extension.h" | 25 #include "chrome/common/extensions/extension.h" |
26 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
27 #include "chrome/test/base/ui_test_utils.h" | 27 #include "chrome/test/base/ui_test_utils.h" |
28 #include "content/public/browser/notification_service.h" | 28 #include "content/public/browser/notification_service.h" |
29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
30 #include "content/public/test/browser_test_utils.h" | 30 #include "content/public/test/browser_test_utils.h" |
31 #include "googleurl/src/gurl.h" | 31 #include "googleurl/src/gurl.h" |
32 #include "net/base/mock_host_resolver.h" | 32 #include "net/dns/mock_host_resolver.h" |
33 | 33 |
34 using extensions::Extension; | 34 using extensions::Extension; |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 // This unfortunate bit of silliness is necessary when loading an extension in | 38 // This unfortunate bit of silliness is necessary when loading an extension in |
39 // incognito. The goal is to load the extension, enable incognito, then wait | 39 // incognito. The goal is to load the extension, enable incognito, then wait |
40 // for both background pages to load and close. The problem is that enabling | 40 // for both background pages to load and close. The problem is that enabling |
41 // incognito involves reloading the extension - and the background pages may | 41 // incognito involves reloading the extension - and the background pages may |
42 // have already loaded once before then. So we wait until the extension is | 42 // have already loaded once before then. So we wait until the extension is |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 | 446 |
447 EXPECT_TRUE(event_page_ready.WaitUntilSatisfied()); | 447 EXPECT_TRUE(event_page_ready.WaitUntilSatisfied()); |
448 | 448 |
449 page_ready.Reply("go"); | 449 page_ready.Reply("go"); |
450 | 450 |
451 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 451 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
452 } | 452 } |
453 | 453 |
454 // TODO: background page with timer. | 454 // TODO: background page with timer. |
455 // TODO: background page that interacts with popup. | 455 // TODO: background page that interacts with popup. |
OLD | NEW |