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

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

Issue 10920017: [Sync] Generalize StringOrdinal to handle ordinal_in_parent field (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Relax tests Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 19 matching lines...) Expand all
30 #include "chrome/common/chrome_paths.h" 30 #include "chrome/common/chrome_paths.h"
31 #include "chrome/common/chrome_switches.h" 31 #include "chrome/common/chrome_switches.h"
32 #include "chrome/common/chrome_version_info.h" 32 #include "chrome/common/chrome_version_info.h"
33 #include "chrome/test/base/ui_test_utils.h" 33 #include "chrome/test/base/ui_test_utils.h"
34 #include "content/public/browser/navigation_controller.h" 34 #include "content/public/browser/navigation_controller.h"
35 #include "content/public/browser/navigation_entry.h" 35 #include "content/public/browser/navigation_entry.h"
36 #include "content/public/browser/notification_registrar.h" 36 #include "content/public/browser/notification_registrar.h"
37 #include "content/public/browser/notification_service.h" 37 #include "content/public/browser/notification_service.h"
38 #include "content/public/browser/render_view_host.h" 38 #include "content/public/browser/render_view_host.h"
39 #include "content/public/test/browser_test_utils.h" 39 #include "content/public/test/browser_test_utils.h"
40 #include "sync/api/string_ordinal.h"
40 41
41 using extensions::Extension; 42 using extensions::Extension;
42 using extensions::ExtensionCreator; 43 using extensions::ExtensionCreator;
43 44
44 ExtensionBrowserTest::ExtensionBrowserTest() 45 ExtensionBrowserTest::ExtensionBrowserTest()
45 : loaded_(false), 46 : loaded_(false),
46 installed_(false), 47 installed_(false),
47 extension_installs_observed_(0), 48 extension_installs_observed_(0),
48 extension_load_errors_observed_(0), 49 extension_load_errors_observed_(0),
49 target_page_action_count_(-1), 50 target_page_action_count_(-1),
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 return NULL; 122 return NULL;
122 } 123 }
123 } 124 }
124 125
125 const std::string extension_id = extension->id(); 126 const std::string extension_id = extension->id();
126 127
127 // The call to OnExtensionInstalled ensures the other extension prefs 128 // The call to OnExtensionInstalled ensures the other extension prefs
128 // are set up with the defaults. 129 // are set up with the defaults.
129 service->extension_prefs()->OnExtensionInstalled( 130 service->extension_prefs()->OnExtensionInstalled(
130 extension, Extension::ENABLED, false, 131 extension, Extension::ENABLED, false,
131 StringOrdinal::CreateInitialOrdinal()); 132 syncer::StringOrdinal::CreateInitialOrdinal());
132 133
133 // Toggling incognito or file access will reload the extension, so wait for 134 // Toggling incognito or file access will reload the extension, so wait for
134 // the reload and grab the new extension instance. The default state is 135 // the reload and grab the new extension instance. The default state is
135 // incognito disabled and file access enabled, so we don't wait in those 136 // incognito disabled and file access enabled, so we don't wait in those
136 // cases. 137 // cases.
137 { 138 {
138 content::WindowedNotificationObserver load_signal( 139 content::WindowedNotificationObserver load_signal(
139 chrome::NOTIFICATION_EXTENSION_LOADED, 140 chrome::NOTIFICATION_EXTENSION_LOADED,
140 content::Source<Profile>(browser()->profile())); 141 content::Source<Profile>(browser()->profile()));
141 CHECK(!service->IsIncognitoEnabled(extension_id)); 142 CHECK(!service->IsIncognitoEnabled(extension_id));
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 case content::NOTIFICATION_LOAD_STOP: 676 case content::NOTIFICATION_LOAD_STOP:
676 VLOG(1) << "Got LOAD_STOP notification."; 677 VLOG(1) << "Got LOAD_STOP notification.";
677 MessageLoopForUI::current()->Quit(); 678 MessageLoopForUI::current()->Quit();
678 break; 679 break;
679 680
680 default: 681 default:
681 NOTREACHED(); 682 NOTREACHED();
682 break; 683 break;
683 } 684 }
684 } 685 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | chrome/browser/extensions/extension_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698