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

Side by Side Diff: runtime/vm/service_test.cc

Issue 2356613002: Fix VM test Service_IsolateStickyError (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "include/dart_tools_api.h" 7 #include "include/dart_tools_api.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 JSONStream js; 161 JSONStream js;
162 isolate->PrintJSON(&js, false); 162 isolate->PrintJSON(&js, false);
163 // No error property and no PauseExit state. 163 // No error property and no PauseExit state.
164 EXPECT_NOTSUBSTRING("\"error\":", js.ToCString()); 164 EXPECT_NOTSUBSTRING("\"error\":", js.ToCString());
165 EXPECT_NOTSUBSTRING("HI THERE STICKY", js.ToCString()); 165 EXPECT_NOTSUBSTRING("HI THERE STICKY", js.ToCString());
166 EXPECT_NOTSUBSTRING("PauseExit", js.ToCString()); 166 EXPECT_NOTSUBSTRING("PauseExit", js.ToCString());
167 } 167 }
168 168
169 // Set the sticky error. 169 // Set the sticky error.
170 Dart_SetStickyError(result); 170 Dart_SetStickyError(result);
171 Dart_SetPausedOnExit(true);
171 EXPECT(Dart_HasStickyError()); 172 EXPECT(Dart_HasStickyError());
172 173
173 { 174 {
174 TransitionNativeToVM transition(thread); 175 TransitionNativeToVM transition(thread);
175 176
176 JSONStream js; 177 JSONStream js;
177 isolate->PrintJSON(&js, false); 178 isolate->PrintJSON(&js, false);
178 // Error and PauseExit set. 179 // Error and PauseExit set.
179 EXPECT_SUBSTRING("\"error\":", js.ToCString()); 180 EXPECT_SUBSTRING("\"error\":", js.ToCString());
180 EXPECT_SUBSTRING("HI THERE STICKY", js.ToCString()); 181 EXPECT_SUBSTRING("HI THERE STICKY", js.ToCString());
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); 790 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage());
790 // Expect error. 791 // Expect error.
791 EXPECT_SUBSTRING("\"error\"", handler.msg()); 792 EXPECT_SUBSTRING("\"error\"", handler.msg());
792 } 793 }
793 794
794 #endif // !defined(TARGET_ARCH_ARM64) 795 #endif // !defined(TARGET_ARCH_ARM64)
795 796
796 #endif // !PRODUCT 797 #endif // !PRODUCT
797 798
798 } // namespace dart 799 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698