| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import string | 6 import string |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 HEADER = """\ | 9 HEADER = """\ |
| 10 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 10 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // string result = SStringPrintf("In request of %d %s ", n, request); | 50 // string result = SStringPrintf("In request of %d %s ", n, request); |
| 51 // for (int i = 0; i < n; ++i) result.append(reply) | 51 // for (int i = 0; i < n; ++i) result.append(reply) |
| 52 // return result; | 52 // return result; |
| 53 // } | 53 // } |
| 54 // | 54 // |
| 55 // void DoLogMessage(int level, const string& message) { | 55 // void DoLogMessage(int level, const string& message) { |
| 56 // } | 56 // } |
| 57 // | 57 // |
| 58 // void QuitMessageLoop(int seconds) { | 58 // void QuitMessageLoop(int seconds) { |
| 59 // base::MessageLoop* loop = base::MessageLoop::current(); | 59 // base::MessageLoop* loop = base::MessageLoop::current(); |
| 60 // loop->PostDelayedTask(FROM_HERE, base::MessageLoop::QuitClosure(), | 60 // loop->PostDelayedTask(FROM_HERE, |
| 61 // base::MessageLoop::QuitWhenIdleClosure(), |
| 61 // 1000 * seconds); | 62 // 1000 * seconds); |
| 62 // } | 63 // } |
| 63 // }; | 64 // }; |
| 64 // | 65 // |
| 65 // Mock mock; | 66 // Mock mock; |
| 66 // // Will invoke mock.HandleFlowers("orchids", n, request) | 67 // // Will invoke mock.HandleFlowers("orchids", n, request) |
| 67 // // "orchids" is a pre-bound argument, and <n> and <request> are call-time | 68 // // "orchids" is a pre-bound argument, and <n> and <request> are call-time |
| 68 // // arguments - they are not known until the OnRequest mock is invoked. | 69 // // arguments - they are not known until the OnRequest mock is invoked. |
| 69 // EXPECT_CALL(mock, OnRequest(Ge(5), base::StartsWith("flower")) | 70 // EXPECT_CALL(mock, OnRequest(Ge(5), base::StartsWith("flower")) |
| 70 // .Times(1) | 71 // .Times(1) |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 print MUTANT | 442 print MUTANT |
| 442 for prebound in xrange(0, 6 + 1): | 443 for prebound in xrange(0, 6 + 1): |
| 443 for args in xrange(0, 6 + 1): | 444 for args in xrange(0, 6 + 1): |
| 444 GenerateCreateFunctor(prebound, args) | 445 GenerateCreateFunctor(prebound, args) |
| 445 print FOOTER | 446 print FOOTER |
| 446 return 0 | 447 return 0 |
| 447 | 448 |
| 448 | 449 |
| 449 if __name__ == "__main__": | 450 if __name__ == "__main__": |
| 450 sys.exit(main()) | 451 sys.exit(main()) |
| OLD | NEW |