OLD | NEW |
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 "chrome/browser/extensions/chrome_app_sorting.h" | 5 #include "chrome/browser/extensions/chrome_app_sorting.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "chrome/browser/extensions/extension_prefs_unittest.h" | 9 #include "chrome/browser/extensions/extension_prefs_unittest.h" |
10 #include "chrome/common/extensions/extension_constants.h" | 10 #include "chrome/common/extensions/extension_constants.h" |
11 #include "extensions/common/manifest_constants.h" | 11 #include "extensions/common/manifest_constants.h" |
12 #include "sync/api/string_ordinal.h" | 12 #include "sync/api/string_ordinal.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 namespace keys = manifest_keys; | 17 namespace keys = manifest_keys; |
18 | 18 |
19 class ChromeAppSortingTest : public ExtensionPrefsTest { | 19 class ChromeAppSortingTest : public ExtensionPrefsTest { |
| 20 public: |
| 21 ChromeAppSortingTest() : ExtensionPrefsTest(NULL) {} |
| 22 |
20 protected: | 23 protected: |
21 ChromeAppSorting* app_sorting() { | 24 ChromeAppSorting* app_sorting() { |
22 return static_cast<ChromeAppSorting*>(prefs()->app_sorting()); | 25 return static_cast<ChromeAppSorting*>(prefs()->app_sorting()); |
23 } | 26 } |
24 }; | 27 }; |
25 | 28 |
26 class ChromeAppSortingAppLocation : public ChromeAppSortingTest { | 29 class ChromeAppSortingAppLocation : public ChromeAppSortingTest { |
27 public: | 30 public: |
28 virtual void Initialize() OVERRIDE { | 31 virtual void Initialize() OVERRIDE { |
29 extension_ = prefs_.AddExtension("not_an_app"); | 32 extension_ = prefs_.AddExtension("not_an_app"); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 private: | 145 private: |
143 syncer::StringOrdinal first_page_; | 146 syncer::StringOrdinal first_page_; |
144 scoped_refptr<Extension> extension_; | 147 scoped_refptr<Extension> extension_; |
145 }; | 148 }; |
146 TEST_F(ChromeAppSortingPageOrdinal, ChromeAppSortingPageOrdinal) {} | 149 TEST_F(ChromeAppSortingPageOrdinal, ChromeAppSortingPageOrdinal) {} |
147 | 150 |
148 // Ensure that ChromeAppSorting is able to properly initialize off a set | 151 // Ensure that ChromeAppSorting is able to properly initialize off a set |
149 // of old page and app launch indices and properly convert them. | 152 // of old page and app launch indices and properly convert them. |
150 class ChromeAppSortingInitialize : public PrefsPrepopulatedTestBase { | 153 class ChromeAppSortingInitialize : public PrefsPrepopulatedTestBase { |
151 public: | 154 public: |
152 ChromeAppSortingInitialize() {} | 155 ChromeAppSortingInitialize() : PrefsPrepopulatedTestBase(NULL) {} |
153 virtual ~ChromeAppSortingInitialize() {} | 156 virtual ~ChromeAppSortingInitialize() {} |
154 | 157 |
155 virtual void Initialize() OVERRIDE { | 158 virtual void Initialize() OVERRIDE { |
156 // A preference determining the order of which the apps appear on the NTP. | 159 // A preference determining the order of which the apps appear on the NTP. |
157 const char kPrefAppLaunchIndexDeprecated[] = "app_launcher_index"; | 160 const char kPrefAppLaunchIndexDeprecated[] = "app_launcher_index"; |
158 // A preference determining the page on which an app appears in the NTP. | 161 // A preference determining the page on which an app appears in the NTP. |
159 const char kPrefPageIndexDeprecated[] = "page_index"; | 162 const char kPrefPageIndexDeprecated[] = "page_index"; |
160 | 163 |
161 // Setup the deprecated preferences. | 164 // Setup the deprecated preferences. |
162 ExtensionScopedPrefs* scoped_prefs = | 165 ExtensionScopedPrefs* scoped_prefs = |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 EXPECT_TRUE(first_ordinal.LessThan( | 213 EXPECT_TRUE(first_ordinal.LessThan( |
211 app_sorting->GetPageOrdinal(extension3()->id()))); | 214 app_sorting->GetPageOrdinal(extension3()->id()))); |
212 } | 215 } |
213 }; | 216 }; |
214 TEST_F(ChromeAppSortingInitialize, ChromeAppSortingInitialize) {} | 217 TEST_F(ChromeAppSortingInitialize, ChromeAppSortingInitialize) {} |
215 | 218 |
216 // Make sure that initialization still works when no extensions are present | 219 // Make sure that initialization still works when no extensions are present |
217 // (i.e. make sure that the web store icon is still loaded into the map). | 220 // (i.e. make sure that the web store icon is still loaded into the map). |
218 class ChromeAppSortingInitializeWithNoApps : public PrefsPrepopulatedTestBase { | 221 class ChromeAppSortingInitializeWithNoApps : public PrefsPrepopulatedTestBase { |
219 public: | 222 public: |
220 ChromeAppSortingInitializeWithNoApps() {} | 223 ChromeAppSortingInitializeWithNoApps() : PrefsPrepopulatedTestBase(NULL) {} |
221 virtual ~ChromeAppSortingInitializeWithNoApps() {} | 224 virtual ~ChromeAppSortingInitializeWithNoApps() {} |
222 | 225 |
223 virtual void Initialize() OVERRIDE { | 226 virtual void Initialize() OVERRIDE { |
224 AppSorting* app_sorting = prefs()->app_sorting(); | 227 AppSorting* app_sorting = prefs()->app_sorting(); |
225 | 228 |
226 // Make sure that the web store has valid ordinals. | 229 // Make sure that the web store has valid ordinals. |
227 syncer::StringOrdinal initial_ordinal = | 230 syncer::StringOrdinal initial_ordinal = |
228 syncer::StringOrdinal::CreateInitialOrdinal(); | 231 syncer::StringOrdinal::CreateInitialOrdinal(); |
229 app_sorting->SetPageOrdinal(extension_misc::kWebStoreAppId, | 232 app_sorting->SetPageOrdinal(extension_misc::kWebStoreAppId, |
230 initial_ordinal); | 233 initial_ordinal); |
(...skipping 27 matching lines...) Expand all Loading... |
258 TEST_F(ChromeAppSortingInitializeWithNoApps, | 261 TEST_F(ChromeAppSortingInitializeWithNoApps, |
259 ChromeAppSortingInitializeWithNoApps) {} | 262 ChromeAppSortingInitializeWithNoApps) {} |
260 | 263 |
261 // Tests the application index to ordinal migration code for values that | 264 // Tests the application index to ordinal migration code for values that |
262 // shouldn't be converted. This should be removed when the migrate code | 265 // shouldn't be converted. This should be removed when the migrate code |
263 // is taken out. | 266 // is taken out. |
264 // http://crbug.com/107376 | 267 // http://crbug.com/107376 |
265 class ChromeAppSortingMigrateAppIndexInvalid | 268 class ChromeAppSortingMigrateAppIndexInvalid |
266 : public PrefsPrepopulatedTestBase { | 269 : public PrefsPrepopulatedTestBase { |
267 public: | 270 public: |
268 ChromeAppSortingMigrateAppIndexInvalid() {} | 271 ChromeAppSortingMigrateAppIndexInvalid() : PrefsPrepopulatedTestBase(NULL) {} |
269 virtual ~ChromeAppSortingMigrateAppIndexInvalid() {} | 272 virtual ~ChromeAppSortingMigrateAppIndexInvalid() {} |
270 | 273 |
271 virtual void Initialize() OVERRIDE { | 274 virtual void Initialize() OVERRIDE { |
272 // A preference determining the order of which the apps appear on the NTP. | 275 // A preference determining the order of which the apps appear on the NTP. |
273 const char kPrefAppLaunchIndexDeprecated[] = "app_launcher_index"; | 276 const char kPrefAppLaunchIndexDeprecated[] = "app_launcher_index"; |
274 // A preference determining the page on which an app appears in the NTP. | 277 // A preference determining the page on which an app appears in the NTP. |
275 const char kPrefPageIndexDeprecated[] = "page_index"; | 278 const char kPrefPageIndexDeprecated[] = "page_index"; |
276 | 279 |
277 // Setup the deprecated preference. | 280 // Setup the deprecated preference. |
278 ExtensionScopedPrefs* scoped_prefs = | 281 ExtensionScopedPrefs* scoped_prefs = |
(...skipping 15 matching lines...) Expand all Loading... |
294 EXPECT_FALSE(prefs()->app_sorting()->GetAppLaunchOrdinal( | 297 EXPECT_FALSE(prefs()->app_sorting()->GetAppLaunchOrdinal( |
295 extension1()->id()).IsValid()); | 298 extension1()->id()).IsValid()); |
296 } | 299 } |
297 }; | 300 }; |
298 TEST_F(ChromeAppSortingMigrateAppIndexInvalid, | 301 TEST_F(ChromeAppSortingMigrateAppIndexInvalid, |
299 ChromeAppSortingMigrateAppIndexInvalid) {} | 302 ChromeAppSortingMigrateAppIndexInvalid) {} |
300 | 303 |
301 class ChromeAppSortingFixNTPCollisionsAllCollide | 304 class ChromeAppSortingFixNTPCollisionsAllCollide |
302 : public PrefsPrepopulatedTestBase { | 305 : public PrefsPrepopulatedTestBase { |
303 public: | 306 public: |
304 ChromeAppSortingFixNTPCollisionsAllCollide() {} | 307 ChromeAppSortingFixNTPCollisionsAllCollide() |
| 308 : PrefsPrepopulatedTestBase(NULL) {} |
305 virtual ~ChromeAppSortingFixNTPCollisionsAllCollide() {} | 309 virtual ~ChromeAppSortingFixNTPCollisionsAllCollide() {} |
306 | 310 |
307 virtual void Initialize() OVERRIDE { | 311 virtual void Initialize() OVERRIDE { |
308 repeated_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); | 312 repeated_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); |
309 | 313 |
310 AppSorting* app_sorting = prefs()->app_sorting(); | 314 AppSorting* app_sorting = prefs()->app_sorting(); |
311 | 315 |
312 app_sorting->SetAppLaunchOrdinal(extension1()->id(), | 316 app_sorting->SetAppLaunchOrdinal(extension1()->id(), |
313 repeated_ordinal_); | 317 repeated_ordinal_); |
314 app_sorting->SetPageOrdinal(extension1()->id(), repeated_ordinal_); | 318 app_sorting->SetPageOrdinal(extension1()->id(), repeated_ordinal_); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 354 |
351 private: | 355 private: |
352 syncer::StringOrdinal repeated_ordinal_; | 356 syncer::StringOrdinal repeated_ordinal_; |
353 }; | 357 }; |
354 TEST_F(ChromeAppSortingFixNTPCollisionsAllCollide, | 358 TEST_F(ChromeAppSortingFixNTPCollisionsAllCollide, |
355 ChromeAppSortingFixNTPCollisionsAllCollide) {} | 359 ChromeAppSortingFixNTPCollisionsAllCollide) {} |
356 | 360 |
357 class ChromeAppSortingFixNTPCollisionsSomeCollideAtStart | 361 class ChromeAppSortingFixNTPCollisionsSomeCollideAtStart |
358 : public PrefsPrepopulatedTestBase { | 362 : public PrefsPrepopulatedTestBase { |
359 public: | 363 public: |
360 ChromeAppSortingFixNTPCollisionsSomeCollideAtStart() {} | 364 ChromeAppSortingFixNTPCollisionsSomeCollideAtStart() |
| 365 : PrefsPrepopulatedTestBase(NULL) {} |
361 virtual ~ChromeAppSortingFixNTPCollisionsSomeCollideAtStart() {} | 366 virtual ~ChromeAppSortingFixNTPCollisionsSomeCollideAtStart() {} |
362 | 367 |
363 virtual void Initialize() OVERRIDE { | 368 virtual void Initialize() OVERRIDE { |
364 first_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); | 369 first_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); |
365 syncer::StringOrdinal second_ordinal = first_ordinal_.CreateAfter(); | 370 syncer::StringOrdinal second_ordinal = first_ordinal_.CreateAfter(); |
366 | 371 |
367 AppSorting* app_sorting = prefs()->app_sorting(); | 372 AppSorting* app_sorting = prefs()->app_sorting(); |
368 | 373 |
369 // Have the first two extension in the same position, with a third | 374 // Have the first two extension in the same position, with a third |
370 // (non-colliding) extension after. | 375 // (non-colliding) extension after. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 413 |
409 private: | 414 private: |
410 syncer::StringOrdinal first_ordinal_; | 415 syncer::StringOrdinal first_ordinal_; |
411 }; | 416 }; |
412 TEST_F(ChromeAppSortingFixNTPCollisionsSomeCollideAtStart, | 417 TEST_F(ChromeAppSortingFixNTPCollisionsSomeCollideAtStart, |
413 ChromeAppSortingFixNTPCollisionsSomeCollideAtStart) {} | 418 ChromeAppSortingFixNTPCollisionsSomeCollideAtStart) {} |
414 | 419 |
415 class ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd | 420 class ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd |
416 : public PrefsPrepopulatedTestBase { | 421 : public PrefsPrepopulatedTestBase { |
417 public: | 422 public: |
418 ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd() {} | 423 ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd() |
| 424 : PrefsPrepopulatedTestBase(NULL) {} |
419 virtual ~ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd() {} | 425 virtual ~ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd() {} |
420 | 426 |
421 virtual void Initialize() OVERRIDE { | 427 virtual void Initialize() OVERRIDE { |
422 first_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); | 428 first_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); |
423 syncer::StringOrdinal second_ordinal = first_ordinal_.CreateAfter(); | 429 syncer::StringOrdinal second_ordinal = first_ordinal_.CreateAfter(); |
424 | 430 |
425 AppSorting* app_sorting = prefs()->app_sorting(); | 431 AppSorting* app_sorting = prefs()->app_sorting(); |
426 | 432 |
427 // Have the first extension in a non-colliding position, followed by two | 433 // Have the first extension in a non-colliding position, followed by two |
428 // two extension in the same position. | 434 // two extension in the same position. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 472 |
467 private: | 473 private: |
468 syncer::StringOrdinal first_ordinal_; | 474 syncer::StringOrdinal first_ordinal_; |
469 }; | 475 }; |
470 TEST_F(ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd, | 476 TEST_F(ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd, |
471 ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd) {} | 477 ChromeAppSortingFixNTPCollisionsSomeCollideAtEnd) {} |
472 | 478 |
473 class ChromeAppSortingFixNTPCollisionsTwoCollisions | 479 class ChromeAppSortingFixNTPCollisionsTwoCollisions |
474 : public PrefsPrepopulatedTestBase { | 480 : public PrefsPrepopulatedTestBase { |
475 public: | 481 public: |
476 ChromeAppSortingFixNTPCollisionsTwoCollisions() {} | 482 ChromeAppSortingFixNTPCollisionsTwoCollisions() |
| 483 : PrefsPrepopulatedTestBase(NULL) {} |
477 virtual ~ChromeAppSortingFixNTPCollisionsTwoCollisions() {} | 484 virtual ~ChromeAppSortingFixNTPCollisionsTwoCollisions() {} |
478 | 485 |
479 virtual void Initialize() OVERRIDE { | 486 virtual void Initialize() OVERRIDE { |
480 first_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); | 487 first_ordinal_ = syncer::StringOrdinal::CreateInitialOrdinal(); |
481 syncer::StringOrdinal second_ordinal = first_ordinal_.CreateAfter(); | 488 syncer::StringOrdinal second_ordinal = first_ordinal_.CreateAfter(); |
482 | 489 |
483 AppSorting* app_sorting = prefs()->app_sorting(); | 490 AppSorting* app_sorting = prefs()->app_sorting(); |
484 | 491 |
485 // Have two extensions colliding, followed by two more colliding extensions. | 492 // Have two extensions colliding, followed by two more colliding extensions. |
486 app_sorting->SetAppLaunchOrdinal(extension1()->id(), first_ordinal_); | 493 app_sorting->SetAppLaunchOrdinal(extension1()->id(), first_ordinal_); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 541 |
535 private: | 542 private: |
536 syncer::StringOrdinal first_ordinal_; | 543 syncer::StringOrdinal first_ordinal_; |
537 }; | 544 }; |
538 TEST_F(ChromeAppSortingFixNTPCollisionsTwoCollisions, | 545 TEST_F(ChromeAppSortingFixNTPCollisionsTwoCollisions, |
539 ChromeAppSortingFixNTPCollisionsTwoCollisions) {} | 546 ChromeAppSortingFixNTPCollisionsTwoCollisions) {} |
540 | 547 |
541 class ChromeAppSortingEnsureValidOrdinals | 548 class ChromeAppSortingEnsureValidOrdinals |
542 : public PrefsPrepopulatedTestBase { | 549 : public PrefsPrepopulatedTestBase { |
543 public : | 550 public : |
544 ChromeAppSortingEnsureValidOrdinals() {} | 551 ChromeAppSortingEnsureValidOrdinals() : PrefsPrepopulatedTestBase(NULL) {} |
545 virtual ~ChromeAppSortingEnsureValidOrdinals() {} | 552 virtual ~ChromeAppSortingEnsureValidOrdinals() {} |
546 | 553 |
547 virtual void Initialize() OVERRIDE {} | 554 virtual void Initialize() OVERRIDE {} |
548 virtual void Verify() OVERRIDE { | 555 virtual void Verify() OVERRIDE { |
549 AppSorting* app_sorting = prefs()->app_sorting(); | 556 AppSorting* app_sorting = prefs()->app_sorting(); |
550 | 557 |
551 // Give ext1 invalid ordinals and then check that EnsureValidOrdinals fixes | 558 // Give ext1 invalid ordinals and then check that EnsureValidOrdinals fixes |
552 // them. | 559 // them. |
553 app_sorting->SetAppLaunchOrdinal(extension1()->id(), | 560 app_sorting->SetAppLaunchOrdinal(extension1()->id(), |
554 syncer::StringOrdinal()); | 561 syncer::StringOrdinal()); |
555 app_sorting->SetPageOrdinal(extension1()->id(), syncer::StringOrdinal()); | 562 app_sorting->SetPageOrdinal(extension1()->id(), syncer::StringOrdinal()); |
556 | 563 |
557 app_sorting->EnsureValidOrdinals(extension1()->id(), | 564 app_sorting->EnsureValidOrdinals(extension1()->id(), |
558 syncer::StringOrdinal()); | 565 syncer::StringOrdinal()); |
559 | 566 |
560 EXPECT_TRUE(app_sorting->GetAppLaunchOrdinal(extension1()->id()).IsValid()); | 567 EXPECT_TRUE(app_sorting->GetAppLaunchOrdinal(extension1()->id()).IsValid()); |
561 EXPECT_TRUE(app_sorting->GetPageOrdinal(extension1()->id()).IsValid()); | 568 EXPECT_TRUE(app_sorting->GetPageOrdinal(extension1()->id()).IsValid()); |
562 } | 569 } |
563 }; | 570 }; |
564 TEST_F(ChromeAppSortingEnsureValidOrdinals, | 571 TEST_F(ChromeAppSortingEnsureValidOrdinals, |
565 ChromeAppSortingEnsureValidOrdinals) {} | 572 ChromeAppSortingEnsureValidOrdinals) {} |
566 | 573 |
567 class ChromeAppSortingPageOrdinalMapping : public PrefsPrepopulatedTestBase { | 574 class ChromeAppSortingPageOrdinalMapping : public PrefsPrepopulatedTestBase { |
568 public: | 575 public: |
569 ChromeAppSortingPageOrdinalMapping() {} | 576 ChromeAppSortingPageOrdinalMapping() : PrefsPrepopulatedTestBase(NULL) {} |
570 virtual ~ChromeAppSortingPageOrdinalMapping() {} | 577 virtual ~ChromeAppSortingPageOrdinalMapping() {} |
571 | 578 |
572 virtual void Initialize() OVERRIDE {} | 579 virtual void Initialize() OVERRIDE {} |
573 virtual void Verify() OVERRIDE { | 580 virtual void Verify() OVERRIDE { |
574 std::string ext_1 = "ext_1"; | 581 std::string ext_1 = "ext_1"; |
575 std::string ext_2 = "ext_2"; | 582 std::string ext_2 = "ext_2"; |
576 | 583 |
577 ChromeAppSorting* app_sorting = | 584 ChromeAppSorting* app_sorting = |
578 static_cast<ChromeAppSorting*>(prefs()->app_sorting()); | 585 static_cast<ChromeAppSorting*>(prefs()->app_sorting()); |
579 syncer::StringOrdinal first_ordinal = | 586 syncer::StringOrdinal first_ordinal = |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 | 622 |
616 it = app_sorting->ntp_ordinal_map_[first_ordinal].find(first_ordinal); | 623 it = app_sorting->ntp_ordinal_map_[first_ordinal].find(first_ordinal); |
617 EXPECT_EQ(ext_2, it->second); | 624 EXPECT_EQ(ext_2, it->second); |
618 } | 625 } |
619 }; | 626 }; |
620 TEST_F(ChromeAppSortingPageOrdinalMapping, | 627 TEST_F(ChromeAppSortingPageOrdinalMapping, |
621 ChromeAppSortingPageOrdinalMapping) {} | 628 ChromeAppSortingPageOrdinalMapping) {} |
622 | 629 |
623 class ChromeAppSortingPreinstalledAppsBase : public PrefsPrepopulatedTestBase { | 630 class ChromeAppSortingPreinstalledAppsBase : public PrefsPrepopulatedTestBase { |
624 public: | 631 public: |
625 ChromeAppSortingPreinstalledAppsBase() { | 632 ChromeAppSortingPreinstalledAppsBase() : PrefsPrepopulatedTestBase(NULL) { |
626 DictionaryValue simple_dict; | 633 DictionaryValue simple_dict; |
627 simple_dict.SetString(keys::kVersion, "1.0.0.0"); | 634 simple_dict.SetString(keys::kVersion, "1.0.0.0"); |
628 simple_dict.SetString(keys::kName, "unused"); | 635 simple_dict.SetString(keys::kName, "unused"); |
629 simple_dict.SetString(keys::kApp, "true"); | 636 simple_dict.SetString(keys::kApp, "true"); |
630 simple_dict.SetString(keys::kLaunchLocalPath, "fake.html"); | 637 simple_dict.SetString(keys::kLaunchLocalPath, "fake.html"); |
631 | 638 |
632 std::string error; | 639 std::string error; |
633 app1_scoped_ = Extension::Create( | 640 app1_scoped_ = Extension::Create( |
634 prefs_.temp_dir().AppendASCII("app1_"), Manifest::EXTERNAL_PREF, | 641 prefs_.temp_dir().AppendASCII("app1_"), Manifest::EXTERNAL_PREF, |
635 simple_dict, Extension::NO_FLAGS, &error); | 642 simple_dict, Extension::NO_FLAGS, &error); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 } | 960 } |
954 | 961 |
955 private: | 962 private: |
956 scoped_refptr<Extension> other_app_; | 963 scoped_refptr<Extension> other_app_; |
957 scoped_refptr<Extension> yet_another_app_; | 964 scoped_refptr<Extension> yet_another_app_; |
958 }; | 965 }; |
959 TEST_F(ChromeAppSortingDefaultOrdinalNoCollision, | 966 TEST_F(ChromeAppSortingDefaultOrdinalNoCollision, |
960 ChromeAppSortingDefaultOrdinalNoCollision) {} | 967 ChromeAppSortingDefaultOrdinalNoCollision) {} |
961 | 968 |
962 } // namespace extensions | 969 } // namespace extensions |
OLD | NEW |