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

Side by Side Diff: chrome/browser/extensions/api/system_info_storage/system_info_storage_apitest.cc

Issue 10907151: Extensions Docs Server: Enum values do not show up if enum is a type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rtcPrivate fix 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 #include "base/command_line.h" 4 #include "base/command_line.h"
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/timer.h" 6 #include "base/timer.h"
7 #include "chrome/browser/extensions/api/system_info_storage/storage_info_provide r.h" 7 #include "chrome/browser/extensions/api/system_info_storage/storage_info_provide r.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_test_message_listener.h" 9 #include "chrome/browser/extensions/extension_test_message_listener.h"
10 #include "chrome/browser/extensions/system_info_event_router.h" 10 #include "chrome/browser/extensions/system_info_event_router.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 virtual ~MockStorageInfoProvider() { 26 virtual ~MockStorageInfoProvider() {
27 StopWatching(); 27 StopWatching();
28 } 28 }
29 29
30 virtual bool QueryInfo(StorageInfo* info) OVERRIDE { 30 virtual bool QueryInfo(StorageInfo* info) OVERRIDE {
31 info->clear(); 31 info->clear();
32 32
33 linked_ptr<StorageUnitInfo> unit(new StorageUnitInfo()); 33 linked_ptr<StorageUnitInfo> unit(new StorageUnitInfo());
34 unit->id = "0xbeaf"; 34 unit->id = "0xbeaf";
35 unit->type = systeminfo::kStorageTypeUnknown; 35 unit->type = api::experimental_system_info_storage::
36 EXPERIMENTAL_SYSTEM_INFO_STORAGE_STORAGE_UNIT_TYPE_UNKNOWN;
36 unit->capacity = 4098; 37 unit->capacity = 4098;
37 unit->available_capacity = 1024; 38 unit->available_capacity = 1024;
38 39
39 info->push_back(unit); 40 info->push_back(unit);
40 return true; 41 return true;
41 } 42 }
42 43
43 virtual bool QueryUnitInfo(const std::string& id, 44 virtual bool QueryUnitInfo(const std::string& id,
44 StorageUnitInfo* info) OVERRIDE { 45 StorageUnitInfo* info) OVERRIDE {
45 return false; 46 return false;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 GURL page_url = extension->GetResourceURL("test_storage_api.html"); 109 GURL page_url = extension->GetResourceURL("test_storage_api.html");
109 ui_test_utils::NavigateToURL(browser(), page_url); 110 ui_test_utils::NavigateToURL(browser(), page_url);
110 EXPECT_TRUE(listener.WaitUntilSatisfied()); 111 EXPECT_TRUE(listener.WaitUntilSatisfied());
111 112
112 provider->StartWatching(); 113 provider->StartWatching();
113 listener.Reply("go"); 114 listener.Reply("go");
114 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); 115 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
115 } 116 }
116 117
117 } // namespace extensions 118 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698