diff options
| author | Julie | 2014-01-11 16:59:15 -0800 | 
|---|---|---|
| committer | Caitlin Potter | 2014-01-28 14:14:20 -0500 | 
| commit | 7aef2d54e0a48fae18a289813f699962d8310565 (patch) | |
| tree | 60d1d559510c17e879aff798f298e6bcc262d3ab /src/ng/sce.js | |
| parent | ce37ae28687167f7b4274ba547f013980126a219 (diff) | |
| download | angular.js-7aef2d54e0a48fae18a289813f699962d8310565.tar.bz2 | |
test(docs): convert example end to end doc tests from scenario runner to protractor
Thanks to jeffbcross, petebacondarwin, btford, jdeboer, tbosch for contributions!
Closes #6023
Diffstat (limited to 'src/ng/sce.js')
| -rw-r--r-- | src/ng/sce.js | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/src/ng/sce.js b/src/ng/sce.js index 321921f5..a7d616a5 100644 --- a/src/ng/sce.js +++ b/src/ng/sce.js @@ -624,13 +624,15 @@ function $SceDelegateProvider() {  ]  </file> -<file name="scenario.js"> +<file name="protractorTest.js">    describe('SCE doc demo', function() {      it('should sanitize untrusted values', function() { -      expect(element('.htmlComment').html()).toBe('<span>Is <i>anyone</i> reading this?</span>'); +      expect(element(by.css('.htmlComment')).getInnerHtml()) +          .toBe('<span>Is <i>anyone</i> reading this?</span>');      }); +      it('should NOT sanitize explicitly trusted values', function() { -      expect(element('#explicitlyTrustedHtml').html()).toBe( +      expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(            '<span onmouseover="this.textContent="Explicitly trusted HTML bypasses ' +            'sanitization."">Hover over this text.</span>');      }); | 
