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

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: Fix another compile error 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
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return NULL; 120 return NULL;
120 } 121 }
121 } 122 }
122 123
123 const std::string extension_id = extension->id(); 124 const std::string extension_id = extension->id();
124 125
125 // The call to OnExtensionInstalled ensures the other extension prefs 126 // The call to OnExtensionInstalled ensures the other extension prefs
126 // are set up with the defaults. 127 // are set up with the defaults.
127 service->extension_prefs()->OnExtensionInstalled( 128 service->extension_prefs()->OnExtensionInstalled(
128 extension, Extension::ENABLED, false, 129 extension, Extension::ENABLED, false,
129 StringOrdinal::CreateInitialOrdinal()); 130 syncer::StringOrdinal::CreateInitialOrdinal());
130 131
131 // Toggling incognito or file access will reload the extension, so wait for 132 // Toggling incognito or file access will reload the extension, so wait for
132 // the reload and grab the new extension instance. The default state is 133 // the reload and grab the new extension instance. The default state is
133 // incognito disabled and file access enabled, so we don't wait in those 134 // incognito disabled and file access enabled, so we don't wait in those
134 // cases. 135 // cases.
135 { 136 {
136 content::WindowedNotificationObserver load_signal( 137 content::WindowedNotificationObserver load_signal(
137 chrome::NOTIFICATION_EXTENSION_LOADED, 138 chrome::NOTIFICATION_EXTENSION_LOADED,
138 content::Source<Profile>(browser()->profile())); 139 content::Source<Profile>(browser()->profile()));
139 CHECK(!service->IsIncognitoEnabled(extension_id)); 140 CHECK(!service->IsIncognitoEnabled(extension_id));
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 case content::NOTIFICATION_LOAD_STOP: 674 case content::NOTIFICATION_LOAD_STOP:
674 VLOG(1) << "Got LOAD_STOP notification."; 675 VLOG(1) << "Got LOAD_STOP notification.";
675 MessageLoopForUI::current()->Quit(); 676 MessageLoopForUI::current()->Quit();
676 break; 677 break;
677 678
678 default: 679 default:
679 NOTREACHED(); 680 NOTREACHED();
680 break; 681 break;
681 } 682 }
682 } 683 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698