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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_watch_apitest.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // MediaGalleries gallery watch API browser tests. 5 // MediaGalleries gallery watch API browser tests.
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_path_watcher.h" 8 #include "base/files/file_path_watcher.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 /////////////////////////////////////////////////////////////////////////////// 74 ///////////////////////////////////////////////////////////////////////////////
75 75
76 class MediaGalleriesGalleryWatchApiTest : public ExtensionApiTest { 76 class MediaGalleriesGalleryWatchApiTest : public ExtensionApiTest {
77 public: 77 public:
78 MediaGalleriesGalleryWatchApiTest() 78 MediaGalleriesGalleryWatchApiTest()
79 : extension_(NULL), background_host_(NULL) {} 79 : extension_(NULL), background_host_(NULL) {}
80 ~MediaGalleriesGalleryWatchApiTest() override {} 80 ~MediaGalleriesGalleryWatchApiTest() override {}
81 81
82 protected: 82 protected:
83 // ExtensionApiTest overrides. 83 // ExtensionApiTest overrides.
84 void SetUpCommandLine(CommandLine* command_line) override { 84 void SetUpCommandLine(base::CommandLine* command_line) override {
85 ExtensionApiTest::SetUpCommandLine(command_line); 85 ExtensionApiTest::SetUpCommandLine(command_line);
86 command_line->AppendSwitchASCII( 86 command_line->AppendSwitchASCII(
87 extensions::switches::kWhitelistedExtensionID, kTestExtensionId); 87 extensions::switches::kWhitelistedExtensionID, kTestExtensionId);
88 } 88 }
89 void SetUpOnMainThread() override { 89 void SetUpOnMainThread() override {
90 ExtensionApiTest::SetUpOnMainThread(); 90 ExtensionApiTest::SetUpOnMainThread();
91 ensure_media_directories_exists_.reset(new EnsureMediaDirectoriesExists); 91 ensure_media_directories_exists_.reset(new EnsureMediaDirectoriesExists);
92 extension_ = LoadExtension(test_data_dir_.AppendASCII(kTestExtensionPath)); 92 extension_ = LoadExtension(test_data_dir_.AppendASCII(kTestExtensionPath));
93 GetBackgroundHostForTestExtension(); 93 GetBackgroundHostForTestExtension();
94 CreateTestGallery(); 94 CreateTestGallery();
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // Remove all gallery watchers. 351 // Remove all gallery watchers.
352 ExecuteCmdAndCheckReply(kRemoveAllGalleryWatchCmd, kRemoveAllGalleryWatchOK); 352 ExecuteCmdAndCheckReply(kRemoveAllGalleryWatchCmd, kRemoveAllGalleryWatchOK);
353 353
354 // Gallery watchers removed. chrome.mediaGalleries.getAllGalleryWatch 354 // Gallery watchers removed. chrome.mediaGalleries.getAllGalleryWatch
355 // should return an empty list. 355 // should return an empty list.
356 ExtensionTestMessageListener final_get_all_check_finished( 356 ExtensionTestMessageListener final_get_all_check_finished(
357 kNoGalleryWatchesInstalled, false /* no reply */); 357 kNoGalleryWatchesInstalled, false /* no reply */);
358 ExecuteCmdAndCheckReply(kGetAllWatchedGalleryIdsCmd, kGetAllGalleryWatchOK); 358 ExecuteCmdAndCheckReply(kGetAllWatchedGalleryIdsCmd, kGetAllGalleryWatchOK);
359 EXPECT_TRUE(final_get_all_check_finished.WaitUntilSatisfied()); 359 EXPECT_TRUE(final_get_all_check_finished.WaitUntilSatisfied());
360 } 360 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698