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

Unified Diff: chrome/test/ui/javascript_test_util.cc

Issue 7008008: Revert 86577 - Revert 86572 - Revert 86568 - Add initial framework for performance tests that mea... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/ui/ui_perf_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/javascript_test_util.cc
===================================================================
--- chrome/test/ui/javascript_test_util.cc (revision 86577)
+++ chrome/test/ui/javascript_test_util.cc (working copy)
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "content/common/json_value_serializer.h"
@@ -39,28 +38,17 @@
if (!succeeded)
continue;
- const std::string& key(*it);
- std::string result;
+ EXPECT_TRUE(value->IsType(Value::TYPE_STRING));
+ if (value->IsType(Value::TYPE_STRING)) {
+ const std::string& key(*it);
- switch (value->GetType()) {
- case Value::TYPE_STRING:
- succeeded = value->GetAsString(&result);
- break;
- case Value::TYPE_DOUBLE: {
- double double_result;
- succeeded = value->GetAsDouble(&double_result);
- if (succeeded)
- result = base::DoubleToString(double_result);
- break;
- }
- default:
- NOTREACHED() << "Value type not supported!";
- return false;
- }
+ std::string result;
+ succeeded = value->GetAsString(&result);
+ EXPECT_TRUE(succeeded);
- EXPECT_TRUE(succeeded);
- if (succeeded)
- results->insert(std::make_pair(key, result));
+ if (succeeded)
+ results->insert(std::make_pair(key, result));
+ }
}
return true;
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/ui/ui_perf_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698