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

Side by Side Diff: test/cctest/test-debug.cc

Issue 11015008: Fix cctests using Sockets to be able to run in parallel (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-sockets.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5815 matching lines...) Expand 10 before | Expand all | Expand 10 after
5826 debug_message_dispatch_v8_thread.Join(); 5826 debug_message_dispatch_v8_thread.Join();
5827 debug_message_dispatch_debugger_thread.Join(); 5827 debug_message_dispatch_debugger_thread.Join();
5828 } 5828 }
5829 5829
5830 5830
5831 TEST(DebuggerAgent) { 5831 TEST(DebuggerAgent) {
5832 v8::V8::Initialize(); 5832 v8::V8::Initialize();
5833 i::Debugger* debugger = i::Isolate::Current()->debugger(); 5833 i::Debugger* debugger = i::Isolate::Current()->debugger();
5834 // Make sure these ports is not used by other tests to allow tests to run in 5834 // Make sure these ports is not used by other tests to allow tests to run in
5835 // parallel. 5835 // parallel.
5836 const int kPort1 = 5858; 5836 const int kPort1 = 5858 + FlagDependentPortOffset();
5837 const int kPort2 = 5857; 5837 const int kPort2 = 5857 + FlagDependentPortOffset();
5838 const int kPort3 = 5856; 5838 const int kPort3 = 5856 + FlagDependentPortOffset();
5839 5839
5840 // Make a string with the port2 number. 5840 // Make a string with the port2 number.
5841 const int kPortBufferLen = 6; 5841 const int kPortBufferLen = 6;
5842 char port2_str[kPortBufferLen]; 5842 char port2_str[kPortBufferLen];
5843 OS::SNPrintF(i::Vector<char>(port2_str, kPortBufferLen), "%d", kPort2); 5843 OS::SNPrintF(i::Vector<char>(port2_str, kPortBufferLen), "%d", kPort2);
5844 5844
5845 bool ok; 5845 bool ok;
5846 5846
5847 // Initialize the socket library. 5847 // Initialize the socket library.
5848 i::Socket::SetUp(); 5848 i::Socket::SetUp();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
5927 CHECK(client_ != NULL); 5927 CHECK(client_ != NULL);
5928 5928
5929 // Receive a debugger agent protocol message. 5929 // Receive a debugger agent protocol message.
5930 i::DebuggerAgentUtil::ReceiveMessage(client_); 5930 i::DebuggerAgentUtil::ReceiveMessage(client_);
5931 } 5931 }
5932 5932
5933 5933
5934 TEST(DebuggerAgentProtocolOverflowHeader) { 5934 TEST(DebuggerAgentProtocolOverflowHeader) {
5935 // Make sure this port is not used by other tests to allow tests to run in 5935 // Make sure this port is not used by other tests to allow tests to run in
5936 // parallel. 5936 // parallel.
5937 const int kPort = 5860; 5937 const int kPort = 5860 + FlagDependentPortOffset();
5938 static const char* kLocalhost = "localhost"; 5938 static const char* kLocalhost = "localhost";
5939 5939
5940 // Make a string with the port number. 5940 // Make a string with the port number.
5941 const int kPortBufferLen = 6; 5941 const int kPortBufferLen = 6;
5942 char port_str[kPortBufferLen]; 5942 char port_str[kPortBufferLen];
5943 OS::SNPrintF(i::Vector<char>(port_str, kPortBufferLen), "%d", kPort); 5943 OS::SNPrintF(i::Vector<char>(port_str, kPortBufferLen), "%d", kPort);
5944 5944
5945 // Initialize the socket library. 5945 // Initialize the socket library.
5946 i::Socket::SetUp(); 5946 i::Socket::SetUp();
5947 5947
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
7433 TEST(LiveEditDisabled) { 7433 TEST(LiveEditDisabled) {
7434 v8::internal::FLAG_allow_natives_syntax = true; 7434 v8::internal::FLAG_allow_natives_syntax = true;
7435 v8::HandleScope scope; 7435 v8::HandleScope scope;
7436 LocalContext context; 7436 LocalContext context;
7437 v8::Debug::SetLiveEditEnabled(false); 7437 v8::Debug::SetLiveEditEnabled(false);
7438 CompileRun("%LiveEditCompareStrings('', '')"); 7438 CompileRun("%LiveEditCompareStrings('', '')");
7439 } 7439 }
7440 7440
7441 7441
7442 #endif // ENABLE_DEBUGGER_SUPPORT 7442 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-sockets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698