OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 } | 89 } |
90 if (!extension) | 90 if (!extension) |
91 return NULL; | 91 return NULL; |
92 | 92 |
93 const std::string extension_id = extension->id(); | 93 const std::string extension_id = extension->id(); |
94 | 94 |
95 // The call to OnExtensionInstalled ensures the other extension prefs | 95 // The call to OnExtensionInstalled ensures the other extension prefs |
96 // are set up with the defaults. | 96 // are set up with the defaults. |
97 service->extension_prefs()->OnExtensionInstalled( | 97 service->extension_prefs()->OnExtensionInstalled( |
98 extension, Extension::ENABLED, false, 0); | 98 extension, Extension::ENABLED, false, |
| 99 StringOrdinal::CreateValidOrdinal()); |
99 | 100 |
100 // Toggling incognito or file access will reload the extension, so wait for | 101 // Toggling incognito or file access will reload the extension, so wait for |
101 // the reload and grab the new extension instance. The default state is | 102 // the reload and grab the new extension instance. The default state is |
102 // incognito disabled and file access enabled, so we don't wait in those | 103 // incognito disabled and file access enabled, so we don't wait in those |
103 // cases. | 104 // cases. |
104 { | 105 { |
105 ui_test_utils::WindowedNotificationObserver load_signal( | 106 ui_test_utils::WindowedNotificationObserver load_signal( |
106 chrome::NOTIFICATION_EXTENSION_LOADED, | 107 chrome::NOTIFICATION_EXTENSION_LOADED, |
107 content::Source<Profile>(browser()->profile())); | 108 content::Source<Profile>(browser()->profile())); |
108 CHECK(!service->IsIncognitoEnabled(extension_id)); | 109 CHECK(!service->IsIncognitoEnabled(extension_id)); |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 MessageLoopForUI::current()->Quit(); | 497 MessageLoopForUI::current()->Quit(); |
497 } | 498 } |
498 break; | 499 break; |
499 } | 500 } |
500 | 501 |
501 default: | 502 default: |
502 NOTREACHED(); | 503 NOTREACHED(); |
503 break; | 504 break; |
504 } | 505 } |
505 } | 506 } |
OLD | NEW |