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

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

Issue 4438001: First part to fix Bug 50726 "Save extension list and "winning" prefs from extensions" (Closed) Base URL: http://git.chromium.org/git/chromium.git/@trunk
Patch Set: whitespaces Created 10 years, 1 month 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
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/scoped_temp_dir.h" 7 #include "base/scoped_temp_dir.h"
8 #include "base/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "chrome/browser/browser_thread.h" 10 #include "chrome/browser/browser_thread.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 EXPECT_EQ(launch_index + 1, new_launch_index); 360 EXPECT_EQ(launch_index + 1, new_launch_index);
361 361
362 // This extension doesn't exist, so it should return -1. 362 // This extension doesn't exist, so it should return -1.
363 EXPECT_EQ(-1, prefs()->GetAppLaunchIndex("foo")); 363 EXPECT_EQ(-1, prefs()->GetAppLaunchIndex("foo"));
364 } 364 }
365 365
366 private: 366 private:
367 scoped_refptr<Extension> extension_; 367 scoped_refptr<Extension> extension_;
368 }; 368 };
369 TEST_F(ExtensionPrefsAppLaunchIndex, ExtensionPrefsAppLaunchIndex) {} 369 TEST_F(ExtensionPrefsAppLaunchIndex, ExtensionPrefsAppLaunchIndex) {}
370
371 class ExtensionPrefsPrecedences : public ExtensionPrefsTest {
372 public:
373 virtual void Initialize() {
374 std::vector<std::string> precedence;
375 prefs()->GetExtensionPrecedences(&precedence);
376 EXPECT_EQ(0u, precedence.size());
377 }
378
379 virtual void Verify() {
380 std::vector<std::string> precedence;
381 precedence.push_back("A");
382 precedence.push_back("C");
383 precedence.push_back("B");
384 prefs()->PersistExtensionPrecedences(precedence);
385
386 prefs_.RecreateExtensionPrefs();
387
388 std::vector<std::string> retrieved_precedence;
389 prefs()->GetExtensionPrecedences(&retrieved_precedence);
390 EXPECT_EQ(precedence, retrieved_precedence);
391 }
392 };
393 TEST_F(ExtensionPrefsPrecedences, ExtensionPrefsPrecedences) {}
394
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698