Skip to content

Commit

Permalink
Another set of example.com change
Browse files Browse the repository at this point in the history
  • Loading branch information
powerivq committed Feb 12, 2020
1 parent 27fccda commit 1a20b2a
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 110 deletions.
2 changes: 1 addition & 1 deletion ads/google/a4a/test/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe('Google A4A utils', () => {
expect(
getAmpRuntimeTypeParameter({
AMP_CONFIG: {type: 'experimental'},
location: {origin: 'https://www.example.com'},
location: {origin: 'https://www.example.test'},
})
).to.be.null;
});
Expand Down
2 changes: 1 addition & 1 deletion build-system/server/amp4test.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ app.get('/a4a/:bid', (req, res) => {
cors.enableCors(req, res);
const {bid} = req.params;
const body = `
<a href=https://ampbyexample.com target=_blank>
<a href=https://amp.dev target=_blank>
<amp-img alt="AMP Ad" height=250 src=//localhost:9876/amp4test/request-bank/${bid}/deposit/image width=300></amp-img>
</a>
<amp-pixel src="//localhost:9876/amp4test/request-bank/${bid}/deposit/pixel/foo?cid=CLIENT_ID(a)"></amp-pixel>
Expand Down
2 changes: 1 addition & 1 deletion build-system/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ function getLiveBlogItem() {
<div class="social-box">
<amp-social-share type="facebook"
data-param-text="Hello world"
data-param-href="https://example.com/?ref=URL"
data-param-href="https://example.test/?ref=URL"
data-param-app_id="145634995501895"></amp-social-share>
<amp-social-share type="twitter"></amp-social-share>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describes.realWin(
const metaCharset = `<meta charset=utf-8></meta>`;
const metaViewport = `<meta name=viewport content="width=device-width,minimum-scale=1,initial-scale=1"></meta>`;
const ampCustomStyle = `<style amp-custom></style>`;
const linkIcon = `<link href=https://example.com/favicon.ico rel=icon>`;
const linkIcon = `<link href=https://example.test/favicon.ico rel=icon>`;
let doc;
let win;
let fakeImplElem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const crossorigin = `<link crossorigin href=https://fonts.gstatic.com/ rel="dns-
const metaCharset = `<meta charset=utf-8></meta>`;
const metaViewport = `<meta name=viewport content="width=device-width,minimum-scale=1,initial-scale=1"></meta>`;
const ampCustomStyle = `<style amp-custom></style>`;
const linkIcon = `<link href=https://example.com/favicon.ico rel=icon>`;
const linkIcon = `<link href=https://example.test/favicon.ico rel=icon>`;
const ampViewerIntegration = `<script async src=https://cdn.ampproject.org/v0/amp-viewer-integration-0.1.js></script>`;
const ampGmail = `<script async src=https://cdn.ampproject.org/v0/amp-viewer-integration-gmail-0.1.js></script>`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describes.realWin(
'sandbox': 'allow-scripts',
'name': 'some_name',
});
frame.src = 'http://example.com';
frame.src = 'http://example.test';
frame.sentinel = '42';
queue = new IframeTransportMessageQueue(env.win, frame);
});
Expand Down
12 changes: 6 additions & 6 deletions extensions/amp-analytics/0.1/test/test-iframe-transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {user} from '../../../../src/log';

describes.realWin('amp-analytics.iframe-transport', {amp: true}, env => {
let iframeTransport;
const frameUrl = 'http://example.com';
const frameUrl = 'http://example.test';

beforeEach(() => {
iframeTransport = new IframeTransport(
Expand Down Expand Up @@ -61,7 +61,7 @@ describes.realWin('amp-analytics.iframe-transport', {amp: true}, env => {
});

it('enqueues event messages correctly', () => {
const url = 'https://example.com/test';
const url = 'https://example.test/test';
const config = {iframe: url};
iframeTransport.sendRequest('hello, world!', config);
const {queue} = IframeTransport.getFrameData(iframeTransport.getType());
Expand All @@ -74,8 +74,8 @@ describes.realWin('amp-analytics.iframe-transport', {amp: true}, env => {
const iframeTransport2 = new IframeTransport(
env.ampdoc.win,
'some_other_vendor_type',
{iframe: 'https://example.com/test2'},
'https://example.com/test2-2'
{iframe: 'https://example.test/test2'},
'https://example.test/test2-2'
);

const frame1 = IframeTransport.getFrameData(iframeTransport.getType());
Expand All @@ -89,7 +89,7 @@ describes.realWin('amp-analytics.iframe-transport', {amp: true}, env => {
});

it('correctly tracks usageCount and destroys iframes', () => {
const frameUrl2 = 'https://example.com/test2';
const frameUrl2 = 'https://example.test/test2';
const iframeTransport2 = new IframeTransport(
env.ampdoc.win,
'some_other_vendor_type',
Expand Down Expand Up @@ -161,7 +161,7 @@ describes.realWin('amp-analytics.iframe-transport', {amp: true}, env => {
expect(createPerformanceObserverSpy).to.not.be.called;

// Create frame for a new vendor
const frameUrl2 = 'https://example.com/test2';
const frameUrl2 = 'https://example.test/test2';
new IframeTransport(
env.ampdoc.win,
'some_other_vendor_type',
Expand Down
28 changes: 14 additions & 14 deletions extensions/amp-analytics/0.1/test/test-linker-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('LinkerReader', () => {
);
mockWin.getUserLanguage.returns('en-US');
mockWin.location = {
href: 'https://example.com?testlinker=1*1f66u1p*key1*dmFsdWUx',
href: 'https://example.test?testlinker=1*1f66u1p*key1*dmFsdWUx',
};
mockWin.history = {
replaceState: (unusedVar1, unusedVar2, newHref) => {
Expand All @@ -53,63 +53,63 @@ describe('LinkerReader', () => {
expectAsyncConsoleError(/LINKER_PARAM requires two params, name and id/);
expect(linkerReader.get('testlinker')).to.be.null;
expect(mockWin.location.href).to.equal(
'https://example.com?testlinker=1*1f66u1p*key1*dmFsdWUx'
'https://example.test?testlinker=1*1f66u1p*key1*dmFsdWUx'
);
});

it('return null when no linker name', () => {
expect(linkerReader.get('nolinker', 'id')).to.be.null;
expect(mockWin.location.href).to.equal(
'https://example.com?testlinker=1*1f66u1p*key1*dmFsdWUx'
'https://example.test?testlinker=1*1f66u1p*key1*dmFsdWUx'
);
});

it('return null when linker name value is invalid', () => {
expectAsyncConsoleError(/LINKER_PARAM value checksum not valid/);
mockWin.location.href = 'https://example.com?testlinker=1*123*key*error';
mockWin.location.href = 'https://example.test?testlinker=1*123*key*error';
expect(linkerReader.get('testlinker', 'key')).to.be.null;
expect(mockWin.location.href).to.equal('https://example.com/');
expect(mockWin.location.href).to.equal('https://example.test/');
});

it('return null when no linker id value', () => {
mockWin.location.href =
'https://example.com?testlinker=1*1f66u1p*key1*dmFsdWUx';
'https://example.test?testlinker=1*1f66u1p*key1*dmFsdWUx';
expect(linkerReader.get('testlinker', 'key2')).to.be.null;
expect(mockWin.location.href).to.equal('https://example.com/');
expect(mockWin.location.href).to.equal('https://example.test/');
});

it('remove linker_param from url', () => {
mockWin.location.href =
'https://example.com?a=1&b=2&' +
'https://example.test?a=1&b=2&' +
'testlinker=1*1f66u1p*key1*dmFsdWUx&c&' +
'testlinker2=1*1f66u1p*key1*dmFsdWUx&d=2#hash';
linkerReader.get('testlinker', 'id');
expect(mockWin.location.href).to.equal(
'https://example.com/?a=1&b=2&c&' +
'https://example.test/?a=1&b=2&c&' +
'testlinker2=1*1f66u1p*key1*dmFsdWUx&d=2#hash'
);
linkerReader.get('testlinker2', 'key1');
expect(mockWin.location.href).to.equal(
'https://example.com/?a=1&b=2&c&d=2#hash'
'https://example.test/?a=1&b=2&c&d=2#hash'
);
});

it('return correct id value', () => {
mockWin.location.href =
'https://example.com?' +
'https://example.test?' +
'test=1*1f66u1p*key1*dmFsdWUx&var=foo&' +
'test2=1*1m48hbv*cid*MTIzNDU.*ref*aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20.';
expect(linkerReader.get('test', 'key1')).to.equal('value1');
expect(linkerReader.get('test2', 'cid')).to.equal('12345');
expect(linkerReader.get('test2', 'ref')).to.equal(
'https://www.example.com'
'https://www.example.test'
);
expect(mockWin.location.href).to.equal('https://example.com/?var=foo');
expect(mockWin.location.href).to.equal('https://example.test/?var=foo');
});

it('returns same value when reading the same id', () => {
mockWin.location.href =
'https://example.com?test=1*1f66u1p*key1*dmFsdWUx&var=foo';
'https://example.test?test=1*1f66u1p*key1*dmFsdWUx&var=foo';
expect(linkerReader.get('test', 'key1')).to.equal('value1');
expect(linkerReader.get('test', 'key1')).to.equal('value1');
});
Expand Down
4 changes: 2 additions & 2 deletions extensions/amp-analytics/0.1/test/test-linker.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const parseLinkerTests = [
value: '1*1m48hbv*cid*MTIzNDU.*ref*aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20.',
output: {
cid: '12345',
ref: 'https://www.example.com',
ref: 'https://www.example.test',
},
},
{
Expand Down Expand Up @@ -158,7 +158,7 @@ const createLinkerTests = [
version: '1',
pairs: {
cid: '12345',
ref: 'https://www.example.com',
ref: 'https://www.example.test',
},
output: '1*1m48hbv*cid*MTIzNDU.*ref*aHR0cHM6Ly93d3cuZXhhbXBsZS5jb20.',
},
Expand Down
Loading

0 comments on commit 1a20b2a

Please sign in to comment.