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

Unified Diff: runtime/vm/service_test.cc

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 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 | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_test.cc
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 0e4d3613b0af62393859802a2312342ae62bcd2f..c0361cbea46c4f7aeec8cb4ecf4279974babaff8 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -192,7 +192,7 @@ TEST_CASE(Service_Code) {
Eval(lib, "[0, port, '0', 'getObject', ['objectId'], ['code/0']]");
Service::HandleIsolateMessage(isolate, service_msg);
handler.HandleNextMessage();
- EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
+ EXPECT_SUBSTRING("\"error\"", handler.msg());
// The following test checks that a code object can be found only
// at compile_timestamp()-code.EntryPoint().
@@ -222,7 +222,7 @@ TEST_CASE(Service_Code) {
address);
Service::HandleIsolateMessage(isolate, service_msg);
handler.HandleNextMessage();
- EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
+ EXPECT_SUBSTRING("\"error\"", handler.msg());
// Request code object at (compile_timestamp - 1)-code.EntryPoint()
// Expect this to fail because the timestamp is wrong.
@@ -233,7 +233,7 @@ TEST_CASE(Service_Code) {
address);
Service::HandleIsolateMessage(isolate, service_msg);
handler.HandleNextMessage();
- EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
+ EXPECT_SUBSTRING("\"error\"", handler.msg());
// Request native code at address. Expect the null code object back.
address = last;
@@ -252,7 +252,7 @@ TEST_CASE(Service_Code) {
address);
Service::HandleIsolateMessage(isolate, service_msg);
handler.HandleNextMessage();
- EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
+ EXPECT_SUBSTRING("\"error\"", handler.msg());
}
@@ -474,7 +474,7 @@ TEST_CASE(Service_Address) {
Service::HandleIsolateMessage(isolate, service_msg);
handler.HandleNextMessage();
// TODO(turnidge): Should this be a ServiceException instead?
- EXPECT_SUBSTRING("{\"type\":\"Sentinel\",\"id\":\"objects\\/free\","
+ EXPECT_SUBSTRING("{\"type\":\"Sentinel\",\"kind\":\"Free\","
"\"valueAsString\":\"<free>\"",
handler.msg());
}
@@ -607,7 +607,7 @@ TEST_CASE(Service_Profile) {
Service::HandleIsolateMessage(isolate, service_msg);
handler.HandleNextMessage();
// Expect error (tags required).
- EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
+ EXPECT_SUBSTRING("\"error\"", handler.msg());
service_msg =
Eval(lib, "[0, port, '0', 'getCpuProfile', ['tags'], ['None']]");
@@ -621,7 +621,7 @@ TEST_CASE(Service_Profile) {
Service::HandleIsolateMessage(isolate, service_msg);
handler.HandleNextMessage();
// Expect error.
- EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
+ EXPECT_SUBSTRING("\"error\"", handler.msg());
}
#endif // !defined(TARGET_ARCH_ARM64)
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698