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

Unified Diff: chrome/test/data/nacl/debug_stub_browser_tests.py

Issue 1153293003: NaCl cleanup: Stop connecting to the SRPC trusted command channel (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make tests pass Created 5 years, 6 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 | « no previous file | chrome/test/data/nacl/gdb_rsp.py » ('j') | components/nacl/loader/nacl_trusted_listener.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/nacl/debug_stub_browser_tests.py
diff --git a/chrome/test/data/nacl/debug_stub_browser_tests.py b/chrome/test/data/nacl/debug_stub_browser_tests.py
index 8c74c86644be889968027d393fa57271b69f1301..c128507ac8964984d78a9d55b773b7f29e238e7e 100644
--- a/chrome/test/data/nacl/debug_stub_browser_tests.py
+++ b/chrome/test/data/nacl/debug_stub_browser_tests.py
@@ -9,6 +9,15 @@ import xml.etree.ElementTree
import gdb_rsp
+def AssertRaises(exc_class, func):
+ try:
+ func()
+ except exc_class:
+ pass
+ else:
+ raise AssertionError('Function did not raise %r' % exc_class)
+
+
def GetTargetArch(connection):
"""Get the CPU architecture of the NaCl application."""
reply = connection.RspRequest('qXfer:features:read:target.xml:0,fff')
@@ -46,11 +55,11 @@ def GetProgCtrString(connection, arch):
def TestContinue(connection):
- result = connection.RspRequest('vCont;c')
# Once the NaCl test module reports that the test passed, the NaCl <embed>
- # element is removed from the page and so the NaCl module is killed by
- # the browser what is reported as exit due to SIGKILL (X09).
- assert result == 'X09', result
+ # element is removed from the page. The NaCl module will be killed by the
+ # browser which will appear as EOF (end-of-file) on the debug stub socket.
+ AssertRaises(gdb_rsp.EofOnReplyException,
+ lambda: connection.RspRequest('vCont;c'))
def TestBreakpoint(connection):
@@ -78,8 +87,8 @@ def TestBreakpoint(connection):
assert result == 'T05thread:%s;' % thread, result
assert pc != GetProgCtrString(connection, arch)
# Check that we terminate normally
- result = connection.RspRequest('vCont;c')
- assert result == 'X09', result
+ AssertRaises(gdb_rsp.EofOnReplyException,
+ lambda: connection.RspRequest('vCont;c'))
def Main(args):
« no previous file with comments | « no previous file | chrome/test/data/nacl/gdb_rsp.py » ('j') | components/nacl/loader/nacl_trusted_listener.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698